@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.
Files changed (45) hide show
  1. package/.eslintrc.js +1 -0
  2. package/AUTH.md +4 -4
  3. package/BROKER.md +4 -4
  4. package/CALLS.md +9 -9
  5. package/ENHANCE.md +3 -3
  6. package/PROPERTIES.md +24 -9
  7. package/README.md +24 -23
  8. package/SUMMARY.md +2 -2
  9. package/SYSTEMINFO.md +1 -1
  10. package/TAB1.md +2 -2
  11. package/TAB2.md +8 -4
  12. package/TROUBLESHOOT.md +10 -1
  13. package/UTILITIES.md +473 -0
  14. package/adapter.js +12 -12
  15. package/adapterBase.js +52 -16
  16. package/package.json +24 -28
  17. package/pronghorn.json +15 -13
  18. package/propertiesSchema.json +68 -7
  19. package/report/adapterInfo.json +7 -7
  20. package/report/auto-adapter-openapi.json +248 -0
  21. package/report/updateReport1748551931265.json +120 -0
  22. package/sampleProperties.json +4 -0
  23. package/test/integration/adapterTestBasicGet.js +88 -54
  24. package/test/integration/adapterTestConnectivity.js +15 -16
  25. package/test/integration/adapterTestIntegration.js +12 -45
  26. package/test/unit/adapterBaseTestUnit.js +641 -39
  27. package/test/unit/adapterTestUnit.js +28 -61
  28. package/utils/adapterInfo.js +114 -164
  29. package/utils/argParser.js +44 -0
  30. package/utils/checkMigrate.js +77 -38
  31. package/utils/entitiesToDB.js +53 -42
  32. package/utils/logger.js +26 -0
  33. package/utils/modify.js +56 -55
  34. package/utils/mongoDbConnection.js +79 -0
  35. package/utils/mongoUtils.js +162 -0
  36. package/utils/taskMover.js +31 -32
  37. package/utils/tbScript.js +36 -172
  38. package/utils/tbUtils.js +84 -226
  39. package/utils/troubleshootingAdapter.js +68 -84
  40. package/utils/updateAdapterConfig.js +158 -0
  41. package/utils/addAuth.js +0 -94
  42. package/utils/artifactize.js +0 -146
  43. package/utils/basicGet.js +0 -50
  44. package/utils/packModificationScript.js +0 -35
  45. 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
- samProps.host = 'replace.hostorip.here';
40
- samProps.authentication.username = 'username';
41
- samProps.authentication.password = 'password';
42
- samProps.protocol = 'http';
43
- samProps.port = 80;
44
- samProps.ssl.enabled = false;
45
- samProps.ssl.accept_invalid_cert = false;
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
  */