@itentialopensource/adapter-att_mobility 0.5.7 → 0.7.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/.eslintrc.js +1 -0
- package/AUTH.md +4 -4
- package/BROKER.md +4 -4
- package/CALLS.md +9 -9
- package/ENHANCE.md +3 -3
- package/PROPERTIES.md +24 -9
- package/README.md +24 -23
- package/SUMMARY.md +2 -2
- package/SYSTEMINFO.md +1 -1
- package/TAB1.md +2 -2
- package/TAB2.md +8 -4
- package/TROUBLESHOOT.md +10 -1
- package/UTILITIES.md +473 -0
- package/adapter.js +12 -12
- package/adapterBase.js +52 -16
- package/package.json +24 -28
- package/pronghorn.json +15 -13
- package/propertiesSchema.json +68 -7
- package/report/adapterInfo.json +7 -7
- package/report/auto-adapter-openapi.json +248 -0
- package/report/updateReport1748551931265.json +120 -0
- package/sampleProperties.json +4 -0
- package/test/integration/adapterTestBasicGet.js +88 -54
- package/test/integration/adapterTestConnectivity.js +15 -16
- package/test/integration/adapterTestIntegration.js +12 -45
- package/test/unit/adapterBaseTestUnit.js +641 -39
- package/test/unit/adapterTestUnit.js +28 -61
- package/utils/adapterInfo.js +114 -164
- package/utils/argParser.js +44 -0
- package/utils/checkMigrate.js +77 -38
- package/utils/entitiesToDB.js +53 -42
- package/utils/logger.js +26 -0
- package/utils/modify.js +56 -55
- package/utils/mongoDbConnection.js +79 -0
- package/utils/mongoUtils.js +162 -0
- package/utils/taskMover.js +31 -32
- package/utils/tbScript.js +36 -172
- package/utils/tbUtils.js +84 -226
- package/utils/troubleshootingAdapter.js +68 -84
- package/utils/updateAdapterConfig.js +158 -0
- package/utils/addAuth.js +0 -94
- package/utils/artifactize.js +0 -146
- package/utils/basicGet.js +0 -50
- package/utils/packModificationScript.js +0 -35
- package/utils/patches2bundledDeps.js +0 -90
|
@@ -16,11 +16,11 @@ const winston = require('winston');
|
|
|
16
16
|
const { expect } = require('chai');
|
|
17
17
|
const { use } = require('chai');
|
|
18
18
|
const td = require('testdouble');
|
|
19
|
+
const log = require('../../utils/logger');
|
|
19
20
|
|
|
20
21
|
const anything = td.matchers.anything();
|
|
21
22
|
|
|
22
23
|
// stub and attemptTimeout are used throughout the code so set them here
|
|
23
|
-
let logLevel = 'none';
|
|
24
24
|
const isRapidFail = false;
|
|
25
25
|
const isSaveMockData = false;
|
|
26
26
|
|
|
@@ -36,13 +36,17 @@ const samProps = require(`${adaptdir}/sampleProperties.json`).properties;
|
|
|
36
36
|
// these variables can be changed to run in integrated mode so easier to set them here
|
|
37
37
|
// always check these in with bogus data!!!
|
|
38
38
|
samProps.stub = true;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
samProps.
|
|
42
|
-
samProps.
|
|
43
|
-
samProps.
|
|
44
|
-
samProps.
|
|
45
|
-
samProps.
|
|
39
|
+
|
|
40
|
+
// uncomment if connecting
|
|
41
|
+
// samProps.host = 'replace.hostorip.here';
|
|
42
|
+
// samProps.authentication.username = 'username';
|
|
43
|
+
// samProps.authentication.password = 'password';
|
|
44
|
+
// samProps.authentication.token = 'password';
|
|
45
|
+
// samProps.protocol = 'http';
|
|
46
|
+
// samProps.port = 80;
|
|
47
|
+
// samProps.ssl.enabled = false;
|
|
48
|
+
// samProps.ssl.accept_invalid_cert = false;
|
|
49
|
+
|
|
46
50
|
if (samProps.request.attempt_timeout < 30000) {
|
|
47
51
|
samProps.request.attempt_timeout = 30000;
|
|
48
52
|
}
|
|
@@ -67,43 +71,6 @@ global.pronghornProps = {
|
|
|
67
71
|
|
|
68
72
|
global.$HOME = `${__dirname}/../..`;
|
|
69
73
|
|
|
70
|
-
// set the log levels that Pronghorn uses, spam and trace are not defaulted in so without
|
|
71
|
-
// this you may error on log.trace calls.
|
|
72
|
-
const myCustomLevels = {
|
|
73
|
-
levels: {
|
|
74
|
-
spam: 6,
|
|
75
|
-
trace: 5,
|
|
76
|
-
debug: 4,
|
|
77
|
-
info: 3,
|
|
78
|
-
warn: 2,
|
|
79
|
-
error: 1,
|
|
80
|
-
none: 0
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
// need to see if there is a log level passed in
|
|
85
|
-
process.argv.forEach((val) => {
|
|
86
|
-
// is there a log level defined to be passed in?
|
|
87
|
-
if (val.indexOf('--LOG') === 0) {
|
|
88
|
-
// get the desired log level
|
|
89
|
-
const inputVal = val.split('=')[1];
|
|
90
|
-
|
|
91
|
-
// validate the log level is supported, if so set it
|
|
92
|
-
if (Object.hasOwnProperty.call(myCustomLevels.levels, inputVal)) {
|
|
93
|
-
logLevel = inputVal;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
// need to set global logging
|
|
99
|
-
global.log = winston.createLogger({
|
|
100
|
-
level: logLevel,
|
|
101
|
-
levels: myCustomLevels.levels,
|
|
102
|
-
transports: [
|
|
103
|
-
new winston.transports.Console()
|
|
104
|
-
]
|
|
105
|
-
});
|
|
106
|
-
|
|
107
74
|
/**
|
|
108
75
|
* Runs the common asserts for test
|
|
109
76
|
*/
|