@itentialopensource/adapter-128technology 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +1 -0
- package/.eslintrc.js +12 -12
- package/CHANGELOG.md +32 -0
- package/README.md +246 -65
- package/adapter.js +12003 -20
- package/adapterBase.js +529 -9
- package/entities/.generic/action.json +109 -0
- package/entities/.generic/schema.json +23 -0
- package/entities/.system/action.json +1 -0
- package/entities/Analytics/action.json +2 -0
- package/entities/Asset/action.json +1 -0
- package/entities/Authenticate/action.json +1 -0
- package/entities/Config/action.json +505 -0
- package/entities/Plugins/action.json +2 -0
- package/entities/Router/action.json +1 -0
- package/entities/Stats/action.json +1037 -0
- package/error.json +6 -0
- package/package.json +41 -19
- package/pronghorn.json +571 -1
- package/propertiesSchema.json +56 -4
- package/refs?service=git-upload-pack +0 -0
- package/report/updateReport1593633611696.json +95 -0
- package/report/updateReport1614264802205.json +95 -0
- package/report/updateReport1642429912446.json +95 -0
- package/sampleProperties.json +14 -5
- package/test/integration/adapterTestBasicGet.js +85 -0
- package/test/integration/adapterTestConnectivity.js +93 -0
- package/test/integration/adapterTestIntegration.js +21 -8
- package/test/unit/adapterBaseTestUnit.js +944 -0
- package/test/unit/adapterTestUnit.js +632 -12
- package/utils/addAuth.js +94 -0
- package/utils/artifactize.js +0 -1
- package/utils/basicGet.js +50 -0
- package/utils/checkMigrate.js +63 -0
- package/utils/entitiesToDB.js +224 -0
- package/utils/findPath.js +74 -0
- package/utils/modify.js +154 -0
- package/utils/packModificationScript.js +1 -1
- package/utils/patches2bundledDeps.js +90 -0
- package/utils/removeHooks.js +20 -0
- package/utils/tbScript.js +169 -0
- package/utils/tbUtils.js +451 -0
- package/utils/troubleshootingAdapter.js +190 -0
|
@@ -13,7 +13,10 @@ const winston = require('winston');
|
|
|
13
13
|
const { expect } = require('chai');
|
|
14
14
|
const { use } = require('chai');
|
|
15
15
|
const td = require('testdouble');
|
|
16
|
+
const util = require('util');
|
|
17
|
+
const pronghorn = require('../../pronghorn.json');
|
|
16
18
|
|
|
19
|
+
pronghorn.methodsByName = pronghorn.methods.reduce((result, meth) => ({ ...result, [meth.name]: meth }), {});
|
|
17
20
|
const anything = td.matchers.anything();
|
|
18
21
|
|
|
19
22
|
// stub and attemptTimeout are used throughout the code so set them here
|
|
@@ -49,6 +52,7 @@ global.pronghornProps = {
|
|
|
49
52
|
base_path: '/',
|
|
50
53
|
version: 'v1',
|
|
51
54
|
cache_location: 'none',
|
|
55
|
+
encode_pathvars: true,
|
|
52
56
|
save_metric: false,
|
|
53
57
|
stub,
|
|
54
58
|
protocol,
|
|
@@ -61,11 +65,16 @@ global.pronghornProps = {
|
|
|
61
65
|
token_timeout: -1,
|
|
62
66
|
token_cache: 'local',
|
|
63
67
|
auth_field: 'header.headers.Authorization',
|
|
64
|
-
auth_field_format: 'Basic {b64}{username}:{password}{/b64}'
|
|
68
|
+
auth_field_format: 'Basic {b64}{username}:{password}{/b64}',
|
|
69
|
+
auth_logging: false,
|
|
70
|
+
client_id: '',
|
|
71
|
+
client_secret: '',
|
|
72
|
+
grant_type: ''
|
|
65
73
|
},
|
|
66
74
|
healthcheck: {
|
|
67
75
|
type: 'startup',
|
|
68
|
-
frequency: 60000
|
|
76
|
+
frequency: 60000,
|
|
77
|
+
query_object: {}
|
|
69
78
|
},
|
|
70
79
|
throttle: {
|
|
71
80
|
throttle_enabled: false,
|
|
@@ -96,13 +105,16 @@ global.pronghornProps = {
|
|
|
96
105
|
},
|
|
97
106
|
healthcheck_on_timeout: true,
|
|
98
107
|
return_raw: true,
|
|
99
|
-
archiving: false
|
|
108
|
+
archiving: false,
|
|
109
|
+
return_request: false
|
|
100
110
|
},
|
|
101
111
|
proxy: {
|
|
102
112
|
enabled: false,
|
|
103
113
|
host: '',
|
|
104
114
|
port: 1,
|
|
105
|
-
protocol: 'http'
|
|
115
|
+
protocol: 'http',
|
|
116
|
+
username: '',
|
|
117
|
+
password: ''
|
|
106
118
|
},
|
|
107
119
|
ssl: {
|
|
108
120
|
ecdhCurve: '',
|
|
@@ -303,14 +315,13 @@ function saveMockData(entityName, actionName, descriptor, responseData) {
|
|
|
303
315
|
return false;
|
|
304
316
|
}
|
|
305
317
|
|
|
306
|
-
|
|
307
318
|
// require the adapter that we are going to be using
|
|
308
|
-
const
|
|
319
|
+
const Technology = require('../../adapter');
|
|
309
320
|
|
|
310
321
|
// begin the testing - these should be pretty well defined between the describe and the it!
|
|
311
322
|
describe('[integration] 128technology Adapter Test', () => {
|
|
312
|
-
describe('
|
|
313
|
-
const a = new
|
|
323
|
+
describe('Technology Class Tests', () => {
|
|
324
|
+
const a = new Technology(
|
|
314
325
|
pronghornProps.adapterProps.adapters[0].id,
|
|
315
326
|
pronghornProps.adapterProps.adapters[0].properties
|
|
316
327
|
);
|
|
@@ -336,6 +347,8 @@ describe('[integration] 128technology Adapter Test', () => {
|
|
|
336
347
|
try {
|
|
337
348
|
assert.notEqual(null, a);
|
|
338
349
|
assert.notEqual(undefined, a);
|
|
350
|
+
const checkId = global.pronghornProps.adapterProps.adapters[0].id;
|
|
351
|
+
assert.equal(checkId, a.id);
|
|
339
352
|
assert.notEqual(null, a.allProps);
|
|
340
353
|
const check = global.pronghornProps.adapterProps.adapters[0].properties.healthcheck.type;
|
|
341
354
|
assert.equal(check, a.healthcheckType);
|