@itentialopensource/adapter-calix_cloud_devportal 0.1.1

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 (109) hide show
  1. package/.eslintignore +6 -0
  2. package/.eslintrc.js +18 -0
  3. package/.gitlab/.gitkeep +0 -0
  4. package/.gitlab/issue_templates/.gitkeep +0 -0
  5. package/.gitlab/issue_templates/Default.md +17 -0
  6. package/.gitlab/issue_templates/bugReportTemplate.md +76 -0
  7. package/.gitlab/issue_templates/featureRequestTemplate.md +14 -0
  8. package/.jshintrc +0 -0
  9. package/AUTH.md +39 -0
  10. package/BROKER.md +199 -0
  11. package/CALLS.md +639 -0
  12. package/CHANGELOG.md +9 -0
  13. package/CODE_OF_CONDUCT.md +43 -0
  14. package/CONTRIBUTING.md +172 -0
  15. package/ENHANCE.md +69 -0
  16. package/LICENSE +201 -0
  17. package/PROPERTIES.md +641 -0
  18. package/README.md +337 -0
  19. package/SUMMARY.md +9 -0
  20. package/SYSTEMINFO.md +11 -0
  21. package/TROUBLESHOOT.md +47 -0
  22. package/adapter.js +6609 -0
  23. package/adapterBase.js +1787 -0
  24. package/entities/.generic/action.json +214 -0
  25. package/entities/.generic/schema.json +28 -0
  26. package/entities/.system/action.json +50 -0
  27. package/entities/.system/mockdatafiles/getToken-default.json +6 -0
  28. package/entities/.system/mockdatafiles/healthcheck-default.json +3 -0
  29. package/entities/.system/schema.json +19 -0
  30. package/entities/.system/schemaTokenReq.json +75 -0
  31. package/entities/.system/schemaTokenResp.json +53 -0
  32. package/entities/AccessLogs/action.json +25 -0
  33. package/entities/AccessLogs/mockdatafiles/getCaleaAccessLogs-default.json +22 -0
  34. package/entities/AccessLogs/schema.json +19 -0
  35. package/entities/CallOutcome/action.json +25 -0
  36. package/entities/CallOutcome/mockdatafiles/getCalloutcomeSubscriberCallOutcome-default.json +20 -0
  37. package/entities/CallOutcome/schema.json +19 -0
  38. package/entities/E2EServiceDefinitionTemplate/action.json +25 -0
  39. package/entities/E2EServiceDefinitionTemplate/mockdatafiles/searchServiceDefinitions-default.json +35 -0
  40. package/entities/E2EServiceDefinitionTemplate/schema.json +19 -0
  41. package/entities/ManagedServiceArlo/action.json +85 -0
  42. package/entities/ManagedServiceArlo/schema.json +22 -0
  43. package/entities/ManagedServiceServify/action.json +85 -0
  44. package/entities/ManagedServiceServify/schema.json +22 -0
  45. package/entities/NetPerfTest/action.json +188 -0
  46. package/entities/NetPerfTest/mockdatafiles/getNetPerfTestCafIITest-default.json +44 -0
  47. package/entities/NetPerfTest/mockdatafiles/getNetPerfTestOoklaServer-default.json +23 -0
  48. package/entities/NetPerfTest/schema.json +27 -0
  49. package/entities/Reports/action.json +46 -0
  50. package/entities/Reports/mockdatafiles/getTrafficUsage-default.json +56 -0
  51. package/entities/Reports/mockdatafiles/getTrafficUsageForAllSubs-default.json +56 -0
  52. package/entities/Reports/schema.json +20 -0
  53. package/entities/SSID/action.json +147 -0
  54. package/entities/SSID/mockdatafiles/getBillingSupportOperatorSecondarynetwork-default.json +38 -0
  55. package/entities/SSID/mockdatafiles/getBillingSupportOperatorSsid-default.json +29 -0
  56. package/entities/SSID/mockdatafiles/putBillingSupportOperatorSsid-default.json +14 -0
  57. package/entities/SSID/schema.json +25 -0
  58. package/entities/ServiceDefinitions/action.json +126 -0
  59. package/entities/ServiceDefinitions/schema.json +24 -0
  60. package/entities/Subscriber/action.json +106 -0
  61. package/entities/Subscriber/schema.json +23 -0
  62. package/entities/SubscriberAppServices/action.json +66 -0
  63. package/entities/SubscriberAppServices/schema.json +21 -0
  64. package/entities/SubscriberArloServiceDeprecated/action.json +85 -0
  65. package/entities/SubscriberArloServiceDeprecated/schema.json +22 -0
  66. package/entities/SubscriberDevices/action.json +105 -0
  67. package/entities/SubscriberDevices/schema.json +23 -0
  68. package/entities/SubscriberFCCIdentifier/action.json +85 -0
  69. package/entities/SubscriberFCCIdentifier/schema.json +22 -0
  70. package/entities/SubscriberServices/action.json +147 -0
  71. package/entities/SubscriberServices/schema.json +25 -0
  72. package/entities/SubscriberServifyContractDeprecated/action.json +65 -0
  73. package/entities/SubscriberServifyContractDeprecated/schema.json +21 -0
  74. package/entities/SubscriberSmartTownWiFi/action.json +45 -0
  75. package/entities/SubscriberSmartTownWiFi/schema.json +20 -0
  76. package/error.json +190 -0
  77. package/package.json +88 -0
  78. package/pronghorn.json +6245 -0
  79. package/propertiesDecorators.json +14 -0
  80. package/propertiesSchema.json +1248 -0
  81. package/refs?service=git-upload-pack +0 -0
  82. package/report/adapterInfo.json +10 -0
  83. package/report/creationReport.json +755 -0
  84. package/report/merged-calix.json +9420 -0
  85. package/sampleProperties.json +196 -0
  86. package/test/integration/adapterTestBasicGet.js +83 -0
  87. package/test/integration/adapterTestConnectivity.js +93 -0
  88. package/test/integration/adapterTestIntegration.js +2507 -0
  89. package/test/unit/adapterBaseTestUnit.js +949 -0
  90. package/test/unit/adapterTestUnit.js +3622 -0
  91. package/utils/adapterInfo.js +206 -0
  92. package/utils/addAuth.js +94 -0
  93. package/utils/artifactize.js +146 -0
  94. package/utils/basicGet.js +50 -0
  95. package/utils/checkMigrate.js +63 -0
  96. package/utils/entitiesToDB.js +178 -0
  97. package/utils/findPath.js +74 -0
  98. package/utils/methodDocumentor.js +225 -0
  99. package/utils/modify.js +154 -0
  100. package/utils/packModificationScript.js +35 -0
  101. package/utils/patches2bundledDeps.js +90 -0
  102. package/utils/pre-commit.sh +32 -0
  103. package/utils/removeHooks.js +20 -0
  104. package/utils/setup.js +33 -0
  105. package/utils/tbScript.js +246 -0
  106. package/utils/tbUtils.js +490 -0
  107. package/utils/testRunner.js +298 -0
  108. package/utils/troubleshootingAdapter.js +195 -0
  109. package/workflows/README.md +3 -0
@@ -0,0 +1,3622 @@
1
+ /* @copyright Itential, LLC 2019 (pre-modifications) */
2
+
3
+ // Set globals
4
+ /* global describe it log pronghornProps */
5
+ /* eslint global-require: warn */
6
+ /* eslint no-unused-vars: warn */
7
+ /* eslint import/no-dynamic-require:warn */
8
+
9
+ // include required items for testing & logging
10
+ const assert = require('assert');
11
+ const fs = require('fs-extra');
12
+ const mocha = require('mocha');
13
+ const path = require('path');
14
+ const util = require('util');
15
+ const winston = require('winston');
16
+ const execute = require('child_process').execSync;
17
+ const { expect } = require('chai');
18
+ const { use } = require('chai');
19
+ const td = require('testdouble');
20
+ const Ajv = require('ajv');
21
+
22
+ const ajv = new Ajv({ allErrors: true, unknownFormats: 'ignore' });
23
+ const anything = td.matchers.anything();
24
+ let logLevel = 'none';
25
+ const isRapidFail = false;
26
+
27
+ // read in the properties from the sampleProperties files
28
+ let adaptdir = __dirname;
29
+ if (adaptdir.endsWith('/test/integration')) {
30
+ adaptdir = adaptdir.substring(0, adaptdir.length - 17);
31
+ } else if (adaptdir.endsWith('/test/unit')) {
32
+ adaptdir = adaptdir.substring(0, adaptdir.length - 10);
33
+ }
34
+ const samProps = require(`${adaptdir}/sampleProperties.json`).properties;
35
+
36
+ // these variables can be changed to run in integrated mode so easier to set them here
37
+ // always check these in with bogus data!!!
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;
46
+ samProps.request.attempt_timeout = 1200000;
47
+ const attemptTimeout = samProps.request.attempt_timeout;
48
+ const { stub } = samProps;
49
+
50
+ // these are the adapter properties. You generally should not need to alter
51
+ // any of these after they are initially set up
52
+ global.pronghornProps = {
53
+ pathProps: {
54
+ encrypted: false
55
+ },
56
+ adapterProps: {
57
+ adapters: [{
58
+ id: 'Test-calix_cloud_devportal',
59
+ type: 'CalixCloudDevportal',
60
+ properties: samProps
61
+ }]
62
+ }
63
+ };
64
+
65
+ global.$HOME = `${__dirname}/../..`;
66
+
67
+ // set the log levels that Pronghorn uses, spam and trace are not defaulted in so without
68
+ // this you may error on log.trace calls.
69
+ const myCustomLevels = {
70
+ levels: {
71
+ spam: 6,
72
+ trace: 5,
73
+ debug: 4,
74
+ info: 3,
75
+ warn: 2,
76
+ error: 1,
77
+ none: 0
78
+ }
79
+ };
80
+
81
+ // need to see if there is a log level passed in
82
+ process.argv.forEach((val) => {
83
+ // is there a log level defined to be passed in?
84
+ if (val.indexOf('--LOG') === 0) {
85
+ // get the desired log level
86
+ const inputVal = val.split('=')[1];
87
+
88
+ // validate the log level is supported, if so set it
89
+ if (Object.hasOwnProperty.call(myCustomLevels.levels, inputVal)) {
90
+ logLevel = inputVal;
91
+ }
92
+ }
93
+ });
94
+
95
+ // need to set global logging
96
+ global.log = winston.createLogger({
97
+ level: logLevel,
98
+ levels: myCustomLevels.levels,
99
+ transports: [
100
+ new winston.transports.Console()
101
+ ]
102
+ });
103
+
104
+ /**
105
+ * Runs the error asserts for the test
106
+ */
107
+ function runErrorAsserts(data, error, code, origin, displayStr) {
108
+ assert.equal(null, data);
109
+ assert.notEqual(undefined, error);
110
+ assert.notEqual(null, error);
111
+ assert.notEqual(undefined, error.IAPerror);
112
+ assert.notEqual(null, error.IAPerror);
113
+ assert.notEqual(undefined, error.IAPerror.displayString);
114
+ assert.notEqual(null, error.IAPerror.displayString);
115
+ assert.equal(code, error.icode);
116
+ assert.equal(origin, error.IAPerror.origin);
117
+ assert.equal(displayStr, error.IAPerror.displayString);
118
+ }
119
+
120
+ // require the adapter that we are going to be using
121
+ const CalixCloudDevportal = require('../../adapter');
122
+
123
+ // delete the .DS_Store directory in entities -- otherwise this will cause errors
124
+ const dirPath = path.join(__dirname, '../../entities/.DS_Store');
125
+ if (fs.existsSync(dirPath)) {
126
+ try {
127
+ fs.removeSync(dirPath);
128
+ console.log('.DS_Store deleted');
129
+ } catch (e) {
130
+ console.log('Error when deleting .DS_Store:', e);
131
+ }
132
+ }
133
+
134
+ // begin the testing - these should be pretty well defined between the describe and the it!
135
+ describe('[unit] Calix_cloud_devportal Adapter Test', () => {
136
+ describe('CalixCloudDevportal Class Tests', () => {
137
+ const a = new CalixCloudDevportal(
138
+ pronghornProps.adapterProps.adapters[0].id,
139
+ pronghornProps.adapterProps.adapters[0].properties
140
+ );
141
+
142
+ if (isRapidFail) {
143
+ const state = {};
144
+ state.passed = true;
145
+
146
+ mocha.afterEach(function x() {
147
+ state.passed = state.passed
148
+ && (this.currentTest.state === 'passed');
149
+ });
150
+ mocha.beforeEach(function x() {
151
+ if (!state.passed) {
152
+ return this.currentTest.skip();
153
+ }
154
+ return true;
155
+ });
156
+ }
157
+
158
+ describe('#class instance created', () => {
159
+ it('should be a class with properties', (done) => {
160
+ try {
161
+ assert.notEqual(null, a);
162
+ assert.notEqual(undefined, a);
163
+ const checkId = global.pronghornProps.adapterProps.adapters[0].id;
164
+ assert.equal(checkId, a.id);
165
+ assert.notEqual(null, a.allProps);
166
+ const check = global.pronghornProps.adapterProps.adapters[0].properties.healthcheck.type;
167
+ assert.equal(check, a.healthcheckType);
168
+ done();
169
+ } catch (error) {
170
+ log.error(`Test Failure: ${error}`);
171
+ done(error);
172
+ }
173
+ }).timeout(attemptTimeout);
174
+ });
175
+
176
+ describe('adapterBase.js', () => {
177
+ it('should have an adapterBase.js', (done) => {
178
+ try {
179
+ fs.exists('adapterBase.js', (val) => {
180
+ assert.equal(true, val);
181
+ done();
182
+ });
183
+ } catch (error) {
184
+ log.error(`Test Failure: ${error}`);
185
+ done(error);
186
+ }
187
+ });
188
+ });
189
+
190
+ let wffunctions = [];
191
+ describe('#iapGetAdapterWorkflowFunctions', () => {
192
+ it('should retrieve workflow functions', (done) => {
193
+ try {
194
+ wffunctions = a.iapGetAdapterWorkflowFunctions([]);
195
+
196
+ try {
197
+ assert.notEqual(0, wffunctions.length);
198
+ done();
199
+ } catch (err) {
200
+ log.error(`Test Failure: ${err}`);
201
+ done(err);
202
+ }
203
+ } catch (error) {
204
+ log.error(`Adapter Exception: ${error}`);
205
+ done(error);
206
+ }
207
+ }).timeout(attemptTimeout);
208
+ });
209
+
210
+ describe('package.json', () => {
211
+ it('should have a package.json', (done) => {
212
+ try {
213
+ fs.exists('package.json', (val) => {
214
+ assert.equal(true, val);
215
+ done();
216
+ });
217
+ } catch (error) {
218
+ log.error(`Test Failure: ${error}`);
219
+ done(error);
220
+ }
221
+ });
222
+ it('package.json should be validated', (done) => {
223
+ try {
224
+ const packageDotJson = require('../../package.json');
225
+ const { PJV } = require('package-json-validator');
226
+ const options = {
227
+ warnings: true, // show warnings
228
+ recommendations: true // show recommendations
229
+ };
230
+ const results = PJV.validate(JSON.stringify(packageDotJson), 'npm', options);
231
+
232
+ if (results.valid === false) {
233
+ log.error('The package.json contains the following errors: ');
234
+ log.error(util.inspect(results));
235
+ assert.equal(true, results.valid);
236
+ } else {
237
+ assert.equal(true, results.valid);
238
+ }
239
+
240
+ done();
241
+ } catch (error) {
242
+ log.error(`Test Failure: ${error}`);
243
+ done(error);
244
+ }
245
+ });
246
+ it('package.json standard fields should be customized', (done) => {
247
+ try {
248
+ const packageDotJson = require('../../package.json');
249
+ assert.notEqual(-1, packageDotJson.name.indexOf('calix_cloud_devportal'));
250
+ assert.notEqual(undefined, packageDotJson.version);
251
+ assert.notEqual(null, packageDotJson.version);
252
+ assert.notEqual('', packageDotJson.version);
253
+ assert.notEqual(undefined, packageDotJson.description);
254
+ assert.notEqual(null, packageDotJson.description);
255
+ assert.notEqual('', packageDotJson.description);
256
+ assert.equal('adapter.js', packageDotJson.main);
257
+ assert.notEqual(undefined, packageDotJson.wizardVersion);
258
+ assert.notEqual(null, packageDotJson.wizardVersion);
259
+ assert.notEqual('', packageDotJson.wizardVersion);
260
+ assert.notEqual(undefined, packageDotJson.engineVersion);
261
+ assert.notEqual(null, packageDotJson.engineVersion);
262
+ assert.notEqual('', packageDotJson.engineVersion);
263
+ assert.equal('http', packageDotJson.adapterType);
264
+ done();
265
+ } catch (error) {
266
+ log.error(`Test Failure: ${error}`);
267
+ done(error);
268
+ }
269
+ });
270
+ it('package.json proper scripts should be provided', (done) => {
271
+ try {
272
+ const packageDotJson = require('../../package.json');
273
+ assert.notEqual(undefined, packageDotJson.scripts);
274
+ assert.notEqual(null, packageDotJson.scripts);
275
+ assert.notEqual('', packageDotJson.scripts);
276
+ assert.equal('node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js', packageDotJson.scripts.lint);
277
+ assert.equal('node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js --quiet', packageDotJson.scripts['lint:errors']);
278
+ assert.equal('mocha test/unit/adapterBaseTestUnit.js --LOG=error', packageDotJson.scripts['test:baseunit']);
279
+ assert.equal('mocha test/unit/adapterTestUnit.js --LOG=error', packageDotJson.scripts['test:unit']);
280
+ assert.equal('mocha test/integration/adapterTestIntegration.js --LOG=error', packageDotJson.scripts['test:integration']);
281
+ assert.equal('nyc --reporter html --reporter text mocha --reporter dot test/*', packageDotJson.scripts['test:cover']);
282
+ assert.equal('npm run test:baseunit && npm run test:unit && npm run test:integration', packageDotJson.scripts.test);
283
+ done();
284
+ } catch (error) {
285
+ log.error(`Test Failure: ${error}`);
286
+ done(error);
287
+ }
288
+ });
289
+ it('package.json proper directories should be provided', (done) => {
290
+ try {
291
+ const packageDotJson = require('../../package.json');
292
+ assert.notEqual(undefined, packageDotJson.repository);
293
+ assert.notEqual(null, packageDotJson.repository);
294
+ assert.notEqual('', packageDotJson.repository);
295
+ done();
296
+ } catch (error) {
297
+ log.error(`Test Failure: ${error}`);
298
+ done(error);
299
+ }
300
+ });
301
+ it('package.json proper dependencies should be provided', (done) => {
302
+ try {
303
+ const packageDotJson = require('../../package.json');
304
+ assert.notEqual(undefined, packageDotJson.dependencies);
305
+ assert.notEqual(null, packageDotJson.dependencies);
306
+ assert.notEqual('', packageDotJson.dependencies);
307
+ assert.equal('^6.12.0', packageDotJson.dependencies.ajv);
308
+ assert.equal('^0.21.0', packageDotJson.dependencies.axios);
309
+ assert.equal('^2.20.0', packageDotJson.dependencies.commander);
310
+ assert.equal('^8.1.0', packageDotJson.dependencies['fs-extra']);
311
+ assert.equal('^9.0.1', packageDotJson.dependencies.mocha);
312
+ assert.equal('^2.0.1', packageDotJson.dependencies['mocha-param']);
313
+ assert.equal('^0.5.3', packageDotJson.dependencies['network-diagnostics']);
314
+ assert.equal('^15.1.0', packageDotJson.dependencies.nyc);
315
+ assert.equal('^1.4.10', packageDotJson.dependencies['readline-sync']);
316
+ assert.equal('^7.3.2', packageDotJson.dependencies.semver);
317
+ assert.equal('^3.3.3', packageDotJson.dependencies.winston);
318
+ done();
319
+ } catch (error) {
320
+ log.error(`Test Failure: ${error}`);
321
+ done(error);
322
+ }
323
+ });
324
+ it('package.json proper dev dependencies should be provided', (done) => {
325
+ try {
326
+ const packageDotJson = require('../../package.json');
327
+ assert.notEqual(undefined, packageDotJson.devDependencies);
328
+ assert.notEqual(null, packageDotJson.devDependencies);
329
+ assert.notEqual('', packageDotJson.devDependencies);
330
+ assert.equal('^4.3.4', packageDotJson.devDependencies.chai);
331
+ assert.equal('^7.29.0', packageDotJson.devDependencies.eslint);
332
+ assert.equal('^14.2.1', packageDotJson.devDependencies['eslint-config-airbnb-base']);
333
+ assert.equal('^2.23.4', packageDotJson.devDependencies['eslint-plugin-import']);
334
+ assert.equal('^3.0.0', packageDotJson.devDependencies['eslint-plugin-json']);
335
+ assert.equal('^0.6.3', packageDotJson.devDependencies['package-json-validator']);
336
+ assert.equal('^3.16.1', packageDotJson.devDependencies.testdouble);
337
+ done();
338
+ } catch (error) {
339
+ log.error(`Test Failure: ${error}`);
340
+ done(error);
341
+ }
342
+ });
343
+ });
344
+
345
+ describe('pronghorn.json', () => {
346
+ it('should have a pronghorn.json', (done) => {
347
+ try {
348
+ fs.exists('pronghorn.json', (val) => {
349
+ assert.equal(true, val);
350
+ done();
351
+ });
352
+ } catch (error) {
353
+ log.error(`Test Failure: ${error}`);
354
+ done(error);
355
+ }
356
+ });
357
+ it('pronghorn.json should be customized', (done) => {
358
+ try {
359
+ const pronghornDotJson = require('../../pronghorn.json');
360
+ assert.notEqual(-1, pronghornDotJson.id.indexOf('calix_cloud_devportal'));
361
+ assert.equal('Adapter', pronghornDotJson.type);
362
+ assert.equal('CalixCloudDevportal', pronghornDotJson.export);
363
+ assert.equal('Calix_cloud_devportal', pronghornDotJson.title);
364
+ assert.equal('adapter.js', pronghornDotJson.src);
365
+ done();
366
+ } catch (error) {
367
+ log.error(`Test Failure: ${error}`);
368
+ done(error);
369
+ }
370
+ });
371
+ it('pronghorn.json should contain generic adapter methods', (done) => {
372
+ try {
373
+ const pronghornDotJson = require('../../pronghorn.json');
374
+ assert.notEqual(undefined, pronghornDotJson.methods);
375
+ assert.notEqual(null, pronghornDotJson.methods);
376
+ assert.notEqual('', pronghornDotJson.methods);
377
+ assert.equal(true, Array.isArray(pronghornDotJson.methods));
378
+ assert.notEqual(0, pronghornDotJson.methods.length);
379
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapUpdateAdapterConfiguration'));
380
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapFindAdapterPath'));
381
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapTroubleshootAdapter'));
382
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapRunAdapterHealthcheck'));
383
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapRunAdapterConnectivity'));
384
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapRunAdapterBasicGet'));
385
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapSuspendAdapter'));
386
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapUnsuspendAdapter'));
387
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapGetAdapterQueue'));
388
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'genericAdapterRequest'));
389
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'genericAdapterRequestNoBasePath'));
390
+ done();
391
+ } catch (error) {
392
+ log.error(`Test Failure: ${error}`);
393
+ done(error);
394
+ }
395
+ });
396
+ it('pronghorn.json should only expose workflow functions', (done) => {
397
+ try {
398
+ const pronghornDotJson = require('../../pronghorn.json');
399
+
400
+ for (let m = 0; m < pronghornDotJson.methods.length; m += 1) {
401
+ let found = false;
402
+ let paramissue = false;
403
+
404
+ for (let w = 0; w < wffunctions.length; w += 1) {
405
+ if (pronghornDotJson.methods[m].name === wffunctions[w]) {
406
+ found = true;
407
+ const methLine = execute(`grep " ${wffunctions[w]}(" adapter.js | grep "callback) {"`).toString();
408
+ let wfparams = [];
409
+
410
+ if (methLine && methLine.indexOf('(') >= 0 && methLine.indexOf(')') >= 0) {
411
+ const temp = methLine.substring(methLine.indexOf('(') + 1, methLine.lastIndexOf(')'));
412
+ wfparams = temp.split(',');
413
+
414
+ for (let t = 0; t < wfparams.length; t += 1) {
415
+ // remove default value from the parameter name
416
+ wfparams[t] = wfparams[t].substring(0, wfparams[t].search(/=/) > 0 ? wfparams[t].search(/#|\?|=/) : wfparams[t].length);
417
+ // remove spaces
418
+ wfparams[t] = wfparams[t].trim();
419
+
420
+ if (wfparams[t] === 'callback') {
421
+ wfparams.splice(t, 1);
422
+ }
423
+ }
424
+ }
425
+
426
+ // if there are inputs defined but not on the method line
427
+ if (wfparams.length === 0 && (pronghornDotJson.methods[m].input
428
+ && pronghornDotJson.methods[m].input.length > 0)) {
429
+ paramissue = true;
430
+ } else if (wfparams.length > 0 && (!pronghornDotJson.methods[m].input
431
+ || pronghornDotJson.methods[m].input.length === 0)) {
432
+ // if there are no inputs defined but there are on the method line
433
+ paramissue = true;
434
+ } else {
435
+ for (let p = 0; p < pronghornDotJson.methods[m].input.length; p += 1) {
436
+ let pfound = false;
437
+ for (let wfp = 0; wfp < wfparams.length; wfp += 1) {
438
+ if (pronghornDotJson.methods[m].input[p].name.toUpperCase() === wfparams[wfp].toUpperCase()) {
439
+ pfound = true;
440
+ }
441
+ }
442
+
443
+ if (!pfound) {
444
+ paramissue = true;
445
+ }
446
+ }
447
+ for (let wfp = 0; wfp < wfparams.length; wfp += 1) {
448
+ let pfound = false;
449
+ for (let p = 0; p < pronghornDotJson.methods[m].input.length; p += 1) {
450
+ if (pronghornDotJson.methods[m].input[p].name.toUpperCase() === wfparams[wfp].toUpperCase()) {
451
+ pfound = true;
452
+ }
453
+ }
454
+
455
+ if (!pfound) {
456
+ paramissue = true;
457
+ }
458
+ }
459
+ }
460
+
461
+ break;
462
+ }
463
+ }
464
+
465
+ if (!found) {
466
+ // this is the reason to go through both loops - log which ones are not found so
467
+ // they can be worked
468
+ log.error(`${pronghornDotJson.methods[m].name} not found in workflow functions`);
469
+ }
470
+ if (paramissue) {
471
+ // this is the reason to go through both loops - log which ones are not found so
472
+ // they can be worked
473
+ log.error(`${pronghornDotJson.methods[m].name} has a parameter mismatch`);
474
+ }
475
+ assert.equal(true, found);
476
+ assert.equal(false, paramissue);
477
+ }
478
+ done();
479
+ } catch (error) {
480
+ log.error(`Adapter Exception: ${error}`);
481
+ done(error);
482
+ }
483
+ }).timeout(attemptTimeout);
484
+ it('pronghorn.json should expose all workflow functions', (done) => {
485
+ try {
486
+ const pronghornDotJson = require('../../pronghorn.json');
487
+ for (let w = 0; w < wffunctions.length; w += 1) {
488
+ let found = false;
489
+
490
+ for (let m = 0; m < pronghornDotJson.methods.length; m += 1) {
491
+ if (pronghornDotJson.methods[m].name === wffunctions[w]) {
492
+ found = true;
493
+ break;
494
+ }
495
+ }
496
+
497
+ if (!found) {
498
+ // this is the reason to go through both loops - log which ones are not found so
499
+ // they can be worked
500
+ log.error(`${wffunctions[w]} not found in pronghorn.json`);
501
+ }
502
+ assert.equal(true, found);
503
+ }
504
+ done();
505
+ } catch (error) {
506
+ log.error(`Adapter Exception: ${error}`);
507
+ done(error);
508
+ }
509
+ });
510
+ it('pronghorn.json verify input/output schema objects', (done) => {
511
+ const verifySchema = (methodName, schema) => {
512
+ try {
513
+ ajv.compile(schema);
514
+ } catch (error) {
515
+ const errorMessage = `Invalid schema found in '${methodName}' method.
516
+ Schema => ${JSON.stringify(schema)}.
517
+ Details => ${error.message}`;
518
+ throw new Error(errorMessage);
519
+ }
520
+ };
521
+
522
+ try {
523
+ const pronghornDotJson = require('../../pronghorn.json');
524
+ const { methods } = pronghornDotJson;
525
+ for (let i = 0; i < methods.length; i += 1) {
526
+ for (let j = 0; j < methods[i].input.length; j += 1) {
527
+ const inputSchema = methods[i].input[j].schema;
528
+ if (inputSchema) {
529
+ verifySchema(methods[i].name, inputSchema);
530
+ }
531
+ }
532
+ const outputSchema = methods[i].output.schema;
533
+ if (outputSchema) {
534
+ verifySchema(methods[i].name, outputSchema);
535
+ }
536
+ }
537
+ done();
538
+ } catch (error) {
539
+ log.error(`Adapter Exception: ${error}`);
540
+ done(error);
541
+ }
542
+ });
543
+ });
544
+
545
+ describe('propertiesSchema.json', () => {
546
+ it('should have a propertiesSchema.json', (done) => {
547
+ try {
548
+ fs.exists('propertiesSchema.json', (val) => {
549
+ assert.equal(true, val);
550
+ done();
551
+ });
552
+ } catch (error) {
553
+ log.error(`Test Failure: ${error}`);
554
+ done(error);
555
+ }
556
+ });
557
+ it('propertiesSchema.json should be customized', (done) => {
558
+ try {
559
+ const propertiesDotJson = require('../../propertiesSchema.json');
560
+ assert.equal('adapter-calix_cloud_devportal', propertiesDotJson.$id);
561
+ assert.equal('object', propertiesDotJson.type);
562
+ assert.equal('http://json-schema.org/draft-07/schema#', propertiesDotJson.$schema);
563
+ done();
564
+ } catch (error) {
565
+ log.error(`Test Failure: ${error}`);
566
+ done(error);
567
+ }
568
+ });
569
+ it('propertiesSchema.json should contain generic adapter properties', (done) => {
570
+ try {
571
+ const propertiesDotJson = require('../../propertiesSchema.json');
572
+ assert.notEqual(undefined, propertiesDotJson.properties);
573
+ assert.notEqual(null, propertiesDotJson.properties);
574
+ assert.notEqual('', propertiesDotJson.properties);
575
+ assert.equal('string', propertiesDotJson.properties.host.type);
576
+ assert.equal('integer', propertiesDotJson.properties.port.type);
577
+ assert.equal('boolean', propertiesDotJson.properties.stub.type);
578
+ assert.equal('string', propertiesDotJson.properties.protocol.type);
579
+ assert.notEqual(undefined, propertiesDotJson.definitions.authentication);
580
+ assert.notEqual(null, propertiesDotJson.definitions.authentication);
581
+ assert.notEqual('', propertiesDotJson.definitions.authentication);
582
+ assert.equal('string', propertiesDotJson.definitions.authentication.properties.auth_method.type);
583
+ assert.equal('string', propertiesDotJson.definitions.authentication.properties.username.type);
584
+ assert.equal('string', propertiesDotJson.definitions.authentication.properties.password.type);
585
+ assert.equal('string', propertiesDotJson.definitions.authentication.properties.token.type);
586
+ assert.equal('integer', propertiesDotJson.definitions.authentication.properties.invalid_token_error.type);
587
+ assert.equal('integer', propertiesDotJson.definitions.authentication.properties.token_timeout.type);
588
+ assert.equal('string', propertiesDotJson.definitions.authentication.properties.token_cache.type);
589
+ assert.equal(true, Array.isArray(propertiesDotJson.definitions.authentication.properties.auth_field.type));
590
+ assert.equal(true, Array.isArray(propertiesDotJson.definitions.authentication.properties.auth_field_format.type));
591
+ assert.equal('boolean', propertiesDotJson.definitions.authentication.properties.auth_logging.type);
592
+ assert.equal('string', propertiesDotJson.definitions.authentication.properties.client_id.type);
593
+ assert.equal('string', propertiesDotJson.definitions.authentication.properties.client_secret.type);
594
+ assert.equal('string', propertiesDotJson.definitions.authentication.properties.grant_type.type);
595
+ assert.notEqual(undefined, propertiesDotJson.definitions.ssl);
596
+ assert.notEqual(null, propertiesDotJson.definitions.ssl);
597
+ assert.notEqual('', propertiesDotJson.definitions.ssl);
598
+ assert.equal('string', propertiesDotJson.definitions.ssl.properties.ecdhCurve.type);
599
+ assert.equal('boolean', propertiesDotJson.definitions.ssl.properties.enabled.type);
600
+ assert.equal('boolean', propertiesDotJson.definitions.ssl.properties.accept_invalid_cert.type);
601
+ assert.equal('string', propertiesDotJson.definitions.ssl.properties.ca_file.type);
602
+ assert.equal('string', propertiesDotJson.definitions.ssl.properties.key_file.type);
603
+ assert.equal('string', propertiesDotJson.definitions.ssl.properties.cert_file.type);
604
+ assert.equal('string', propertiesDotJson.definitions.ssl.properties.secure_protocol.type);
605
+ assert.equal('string', propertiesDotJson.definitions.ssl.properties.ciphers.type);
606
+ assert.equal('string', propertiesDotJson.properties.base_path.type);
607
+ assert.equal('string', propertiesDotJson.properties.version.type);
608
+ assert.equal('string', propertiesDotJson.properties.cache_location.type);
609
+ assert.equal('boolean', propertiesDotJson.properties.encode_pathvars.type);
610
+ assert.equal('boolean', propertiesDotJson.properties.encode_queryvars.type);
611
+ assert.equal(true, Array.isArray(propertiesDotJson.properties.save_metric.type));
612
+ assert.notEqual(undefined, propertiesDotJson.definitions);
613
+ assert.notEqual(null, propertiesDotJson.definitions);
614
+ assert.notEqual('', propertiesDotJson.definitions);
615
+ assert.notEqual(undefined, propertiesDotJson.definitions.healthcheck);
616
+ assert.notEqual(null, propertiesDotJson.definitions.healthcheck);
617
+ assert.notEqual('', propertiesDotJson.definitions.healthcheck);
618
+ assert.equal('string', propertiesDotJson.definitions.healthcheck.properties.type.type);
619
+ assert.equal('integer', propertiesDotJson.definitions.healthcheck.properties.frequency.type);
620
+ assert.equal('object', propertiesDotJson.definitions.healthcheck.properties.query_object.type);
621
+ assert.notEqual(undefined, propertiesDotJson.definitions.throttle);
622
+ assert.notEqual(null, propertiesDotJson.definitions.throttle);
623
+ assert.notEqual('', propertiesDotJson.definitions.throttle);
624
+ assert.equal('boolean', propertiesDotJson.definitions.throttle.properties.throttle_enabled.type);
625
+ assert.equal('integer', propertiesDotJson.definitions.throttle.properties.number_pronghorns.type);
626
+ assert.equal('string', propertiesDotJson.definitions.throttle.properties.sync_async.type);
627
+ assert.equal('integer', propertiesDotJson.definitions.throttle.properties.max_in_queue.type);
628
+ assert.equal('integer', propertiesDotJson.definitions.throttle.properties.concurrent_max.type);
629
+ assert.equal('integer', propertiesDotJson.definitions.throttle.properties.expire_timeout.type);
630
+ assert.equal('integer', propertiesDotJson.definitions.throttle.properties.avg_runtime.type);
631
+ assert.equal('array', propertiesDotJson.definitions.throttle.properties.priorities.type);
632
+ assert.notEqual(undefined, propertiesDotJson.definitions.request);
633
+ assert.notEqual(null, propertiesDotJson.definitions.request);
634
+ assert.notEqual('', propertiesDotJson.definitions.request);
635
+ assert.equal('integer', propertiesDotJson.definitions.request.properties.number_redirects.type);
636
+ assert.equal('integer', propertiesDotJson.definitions.request.properties.number_retries.type);
637
+ assert.equal(true, Array.isArray(propertiesDotJson.definitions.request.properties.limit_retry_error.type));
638
+ assert.equal('array', propertiesDotJson.definitions.request.properties.failover_codes.type);
639
+ assert.equal('integer', propertiesDotJson.definitions.request.properties.attempt_timeout.type);
640
+ assert.equal('object', propertiesDotJson.definitions.request.properties.global_request.type);
641
+ assert.equal('object', propertiesDotJson.definitions.request.properties.global_request.properties.payload.type);
642
+ assert.equal('object', propertiesDotJson.definitions.request.properties.global_request.properties.uriOptions.type);
643
+ assert.equal('object', propertiesDotJson.definitions.request.properties.global_request.properties.addlHeaders.type);
644
+ assert.equal('object', propertiesDotJson.definitions.request.properties.global_request.properties.authData.type);
645
+ assert.equal('boolean', propertiesDotJson.definitions.request.properties.healthcheck_on_timeout.type);
646
+ assert.equal('boolean', propertiesDotJson.definitions.request.properties.return_raw.type);
647
+ assert.equal('boolean', propertiesDotJson.definitions.request.properties.archiving.type);
648
+ assert.equal('boolean', propertiesDotJson.definitions.request.properties.return_request.type);
649
+ assert.notEqual(undefined, propertiesDotJson.definitions.proxy);
650
+ assert.notEqual(null, propertiesDotJson.definitions.proxy);
651
+ assert.notEqual('', propertiesDotJson.definitions.proxy);
652
+ assert.equal('boolean', propertiesDotJson.definitions.proxy.properties.enabled.type);
653
+ assert.equal('string', propertiesDotJson.definitions.proxy.properties.host.type);
654
+ assert.equal('integer', propertiesDotJson.definitions.proxy.properties.port.type);
655
+ assert.equal('string', propertiesDotJson.definitions.proxy.properties.protocol.type);
656
+ assert.equal('string', propertiesDotJson.definitions.proxy.properties.username.type);
657
+ assert.equal('string', propertiesDotJson.definitions.proxy.properties.password.type);
658
+ assert.notEqual(undefined, propertiesDotJson.definitions.mongo);
659
+ assert.notEqual(null, propertiesDotJson.definitions.mongo);
660
+ assert.notEqual('', propertiesDotJson.definitions.mongo);
661
+ assert.equal('string', propertiesDotJson.definitions.mongo.properties.host.type);
662
+ assert.equal('integer', propertiesDotJson.definitions.mongo.properties.port.type);
663
+ assert.equal('string', propertiesDotJson.definitions.mongo.properties.database.type);
664
+ assert.equal('string', propertiesDotJson.definitions.mongo.properties.username.type);
665
+ assert.equal('string', propertiesDotJson.definitions.mongo.properties.password.type);
666
+ assert.equal('string', propertiesDotJson.definitions.mongo.properties.replSet.type);
667
+ assert.equal('object', propertiesDotJson.definitions.mongo.properties.db_ssl.type);
668
+ assert.equal('boolean', propertiesDotJson.definitions.mongo.properties.db_ssl.properties.enabled.type);
669
+ assert.equal('boolean', propertiesDotJson.definitions.mongo.properties.db_ssl.properties.accept_invalid_cert.type);
670
+ assert.equal('string', propertiesDotJson.definitions.mongo.properties.db_ssl.properties.ca_file.type);
671
+ assert.equal('string', propertiesDotJson.definitions.mongo.properties.db_ssl.properties.key_file.type);
672
+ assert.equal('string', propertiesDotJson.definitions.mongo.properties.db_ssl.properties.cert_file.type);
673
+ assert.notEqual('', propertiesDotJson.definitions.devicebroker);
674
+ assert.equal('array', propertiesDotJson.definitions.devicebroker.properties.getDevice.type);
675
+ assert.equal('array', propertiesDotJson.definitions.devicebroker.properties.getDevicesFiltered.type);
676
+ assert.equal('array', propertiesDotJson.definitions.devicebroker.properties.isAlive.type);
677
+ assert.equal('array', propertiesDotJson.definitions.devicebroker.properties.getConfig.type);
678
+ assert.equal('array', propertiesDotJson.definitions.devicebroker.properties.getCount.type);
679
+ done();
680
+ } catch (error) {
681
+ log.error(`Test Failure: ${error}`);
682
+ done(error);
683
+ }
684
+ });
685
+ });
686
+
687
+ describe('error.json', () => {
688
+ it('should have an error.json', (done) => {
689
+ try {
690
+ fs.exists('error.json', (val) => {
691
+ assert.equal(true, val);
692
+ done();
693
+ });
694
+ } catch (error) {
695
+ log.error(`Test Failure: ${error}`);
696
+ done(error);
697
+ }
698
+ });
699
+ it('error.json should have standard adapter errors', (done) => {
700
+ try {
701
+ const errorDotJson = require('../../error.json');
702
+ assert.notEqual(undefined, errorDotJson.errors);
703
+ assert.notEqual(null, errorDotJson.errors);
704
+ assert.notEqual('', errorDotJson.errors);
705
+ assert.equal(true, Array.isArray(errorDotJson.errors));
706
+ assert.notEqual(0, errorDotJson.errors.length);
707
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.100'));
708
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.101'));
709
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.102'));
710
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.110'));
711
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.111'));
712
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.112'));
713
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.113'));
714
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.114'));
715
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.115'));
716
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.116'));
717
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.300'));
718
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.301'));
719
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.302'));
720
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.303'));
721
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.304'));
722
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.305'));
723
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.310'));
724
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.311'));
725
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.312'));
726
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.320'));
727
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.321'));
728
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.400'));
729
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.401'));
730
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.402'));
731
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.500'));
732
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.501'));
733
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.502'));
734
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.503'));
735
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.600'));
736
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.900'));
737
+ done();
738
+ } catch (error) {
739
+ log.error(`Test Failure: ${error}`);
740
+ done(error);
741
+ }
742
+ });
743
+ });
744
+
745
+ describe('sampleProperties.json', () => {
746
+ it('should have a sampleProperties.json', (done) => {
747
+ try {
748
+ fs.exists('sampleProperties.json', (val) => {
749
+ assert.equal(true, val);
750
+ done();
751
+ });
752
+ } catch (error) {
753
+ log.error(`Test Failure: ${error}`);
754
+ done(error);
755
+ }
756
+ });
757
+ it('sampleProperties.json should contain generic adapter properties', (done) => {
758
+ try {
759
+ const sampleDotJson = require('../../sampleProperties.json');
760
+ assert.notEqual(-1, sampleDotJson.id.indexOf('calix_cloud_devportal'));
761
+ assert.equal('CalixCloudDevportal', sampleDotJson.type);
762
+ assert.notEqual(undefined, sampleDotJson.properties);
763
+ assert.notEqual(null, sampleDotJson.properties);
764
+ assert.notEqual('', sampleDotJson.properties);
765
+ assert.notEqual(undefined, sampleDotJson.properties.host);
766
+ assert.notEqual(undefined, sampleDotJson.properties.port);
767
+ assert.notEqual(undefined, sampleDotJson.properties.stub);
768
+ assert.notEqual(undefined, sampleDotJson.properties.protocol);
769
+ assert.notEqual(undefined, sampleDotJson.properties.authentication);
770
+ assert.notEqual(null, sampleDotJson.properties.authentication);
771
+ assert.notEqual('', sampleDotJson.properties.authentication);
772
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.auth_method);
773
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.username);
774
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.password);
775
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.token);
776
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.invalid_token_error);
777
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.token_timeout);
778
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.token_cache);
779
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.auth_field);
780
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.auth_field_format);
781
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.auth_logging);
782
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.client_secret);
783
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.grant_type);
784
+ assert.notEqual(undefined, sampleDotJson.properties.ssl);
785
+ assert.notEqual(null, sampleDotJson.properties.ssl);
786
+ assert.notEqual('', sampleDotJson.properties.ssl);
787
+ assert.notEqual(undefined, sampleDotJson.properties.ssl.ecdhCurve);
788
+ assert.notEqual(undefined, sampleDotJson.properties.ssl.enabled);
789
+ assert.notEqual(undefined, sampleDotJson.properties.ssl.accept_invalid_cert);
790
+ assert.notEqual(undefined, sampleDotJson.properties.ssl.ca_file);
791
+ assert.notEqual(undefined, sampleDotJson.properties.ssl.key_file);
792
+ assert.notEqual(undefined, sampleDotJson.properties.ssl.cert_file);
793
+ assert.notEqual(undefined, sampleDotJson.properties.ssl.secure_protocol);
794
+ assert.notEqual(undefined, sampleDotJson.properties.ssl.ciphers);
795
+ assert.notEqual(undefined, sampleDotJson.properties.base_path);
796
+ assert.notEqual(undefined, sampleDotJson.properties.version);
797
+ assert.notEqual(undefined, sampleDotJson.properties.cache_location);
798
+ assert.notEqual(undefined, sampleDotJson.properties.encode_pathvars);
799
+ assert.notEqual(undefined, sampleDotJson.properties.encode_queryvars);
800
+ assert.notEqual(undefined, sampleDotJson.properties.save_metric);
801
+ assert.notEqual(undefined, sampleDotJson.properties.healthcheck);
802
+ assert.notEqual(null, sampleDotJson.properties.healthcheck);
803
+ assert.notEqual('', sampleDotJson.properties.healthcheck);
804
+ assert.notEqual(undefined, sampleDotJson.properties.healthcheck.type);
805
+ assert.notEqual(undefined, sampleDotJson.properties.healthcheck.frequency);
806
+ assert.notEqual(undefined, sampleDotJson.properties.healthcheck.query_object);
807
+ assert.notEqual(undefined, sampleDotJson.properties.throttle);
808
+ assert.notEqual(null, sampleDotJson.properties.throttle);
809
+ assert.notEqual('', sampleDotJson.properties.throttle);
810
+ assert.notEqual(undefined, sampleDotJson.properties.throttle.throttle_enabled);
811
+ assert.notEqual(undefined, sampleDotJson.properties.throttle.number_pronghorns);
812
+ assert.notEqual(undefined, sampleDotJson.properties.throttle.sync_async);
813
+ assert.notEqual(undefined, sampleDotJson.properties.throttle.max_in_queue);
814
+ assert.notEqual(undefined, sampleDotJson.properties.throttle.concurrent_max);
815
+ assert.notEqual(undefined, sampleDotJson.properties.throttle.expire_timeout);
816
+ assert.notEqual(undefined, sampleDotJson.properties.throttle.avg_runtime);
817
+ assert.notEqual(undefined, sampleDotJson.properties.throttle.priorities);
818
+ assert.notEqual(undefined, sampleDotJson.properties.request);
819
+ assert.notEqual(null, sampleDotJson.properties.request);
820
+ assert.notEqual('', sampleDotJson.properties.request);
821
+ assert.notEqual(undefined, sampleDotJson.properties.request.number_redirects);
822
+ assert.notEqual(undefined, sampleDotJson.properties.request.number_retries);
823
+ assert.notEqual(undefined, sampleDotJson.properties.request.limit_retry_error);
824
+ assert.notEqual(undefined, sampleDotJson.properties.request.failover_codes);
825
+ assert.notEqual(undefined, sampleDotJson.properties.request.attempt_timeout);
826
+ assert.notEqual(undefined, sampleDotJson.properties.request.global_request);
827
+ assert.notEqual(undefined, sampleDotJson.properties.request.global_request.payload);
828
+ assert.notEqual(undefined, sampleDotJson.properties.request.global_request.uriOptions);
829
+ assert.notEqual(undefined, sampleDotJson.properties.request.global_request.addlHeaders);
830
+ assert.notEqual(undefined, sampleDotJson.properties.request.global_request.authData);
831
+ assert.notEqual(undefined, sampleDotJson.properties.request.healthcheck_on_timeout);
832
+ assert.notEqual(undefined, sampleDotJson.properties.request.return_raw);
833
+ assert.notEqual(undefined, sampleDotJson.properties.request.archiving);
834
+ assert.notEqual(undefined, sampleDotJson.properties.request.return_request);
835
+ assert.notEqual(undefined, sampleDotJson.properties.proxy);
836
+ assert.notEqual(null, sampleDotJson.properties.proxy);
837
+ assert.notEqual('', sampleDotJson.properties.proxy);
838
+ assert.notEqual(undefined, sampleDotJson.properties.proxy.enabled);
839
+ assert.notEqual(undefined, sampleDotJson.properties.proxy.host);
840
+ assert.notEqual(undefined, sampleDotJson.properties.proxy.port);
841
+ assert.notEqual(undefined, sampleDotJson.properties.proxy.protocol);
842
+ assert.notEqual(undefined, sampleDotJson.properties.proxy.username);
843
+ assert.notEqual(undefined, sampleDotJson.properties.proxy.password);
844
+ assert.notEqual(undefined, sampleDotJson.properties.mongo);
845
+ assert.notEqual(null, sampleDotJson.properties.mongo);
846
+ assert.notEqual('', sampleDotJson.properties.mongo);
847
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.host);
848
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.port);
849
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.database);
850
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.username);
851
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.password);
852
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.replSet);
853
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.db_ssl);
854
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.db_ssl.enabled);
855
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.db_ssl.accept_invalid_cert);
856
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.db_ssl.ca_file);
857
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.db_ssl.key_file);
858
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.db_ssl.cert_file);
859
+ assert.notEqual(undefined, sampleDotJson.properties.devicebroker);
860
+ assert.notEqual(undefined, sampleDotJson.properties.devicebroker.getDevice);
861
+ assert.notEqual(undefined, sampleDotJson.properties.devicebroker.getDevicesFiltered);
862
+ assert.notEqual(undefined, sampleDotJson.properties.devicebroker.isAlive);
863
+ assert.notEqual(undefined, sampleDotJson.properties.devicebroker.getConfig);
864
+ assert.notEqual(undefined, sampleDotJson.properties.devicebroker.getCount);
865
+ done();
866
+ } catch (error) {
867
+ log.error(`Test Failure: ${error}`);
868
+ done(error);
869
+ }
870
+ });
871
+ });
872
+
873
+ describe('#checkProperties', () => {
874
+ it('should have a checkProperties function', (done) => {
875
+ try {
876
+ assert.equal(true, typeof a.checkProperties === 'function');
877
+ done();
878
+ } catch (error) {
879
+ log.error(`Test Failure: ${error}`);
880
+ done(error);
881
+ }
882
+ });
883
+ it('the sample properties should be good - if failure change the log level', (done) => {
884
+ try {
885
+ const samplePropsJson = require('../../sampleProperties.json');
886
+ const clean = a.checkProperties(samplePropsJson.properties);
887
+
888
+ try {
889
+ assert.notEqual(0, Object.keys(clean));
890
+ assert.equal(undefined, clean.exception);
891
+ assert.notEqual(undefined, clean.host);
892
+ assert.notEqual(null, clean.host);
893
+ assert.notEqual('', clean.host);
894
+ done();
895
+ } catch (err) {
896
+ log.error(`Test Failure: ${err}`);
897
+ done(err);
898
+ }
899
+ } catch (error) {
900
+ log.error(`Adapter Exception: ${error}`);
901
+ done(error);
902
+ }
903
+ }).timeout(attemptTimeout);
904
+ });
905
+
906
+ describe('README.md', () => {
907
+ it('should have a README', (done) => {
908
+ try {
909
+ fs.exists('README.md', (val) => {
910
+ assert.equal(true, val);
911
+ done();
912
+ });
913
+ } catch (error) {
914
+ log.error(`Test Failure: ${error}`);
915
+ done(error);
916
+ }
917
+ });
918
+ it('README.md should be customized', (done) => {
919
+ try {
920
+ fs.readFile('README.md', 'utf8', (err, data) => {
921
+ assert.equal(-1, data.indexOf('[System]'));
922
+ assert.equal(-1, data.indexOf('[system]'));
923
+ assert.equal(-1, data.indexOf('[version]'));
924
+ assert.equal(-1, data.indexOf('[namespace]'));
925
+ done();
926
+ });
927
+ } catch (error) {
928
+ log.error(`Test Failure: ${error}`);
929
+ done(error);
930
+ }
931
+ });
932
+ });
933
+
934
+ describe('#connect', () => {
935
+ it('should have a connect function', (done) => {
936
+ try {
937
+ assert.equal(true, typeof a.connect === 'function');
938
+ done();
939
+ } catch (error) {
940
+ log.error(`Test Failure: ${error}`);
941
+ done(error);
942
+ }
943
+ });
944
+ });
945
+
946
+ describe('#healthCheck', () => {
947
+ it('should have a healthCheck function', (done) => {
948
+ try {
949
+ assert.equal(true, typeof a.healthCheck === 'function');
950
+ done();
951
+ } catch (error) {
952
+ log.error(`Test Failure: ${error}`);
953
+ done(error);
954
+ }
955
+ });
956
+ });
957
+
958
+ describe('#iapUpdateAdapterConfiguration', () => {
959
+ it('should have a iapUpdateAdapterConfiguration function', (done) => {
960
+ try {
961
+ assert.equal(true, typeof a.iapUpdateAdapterConfiguration === 'function');
962
+ done();
963
+ } catch (error) {
964
+ log.error(`Test Failure: ${error}`);
965
+ done(error);
966
+ }
967
+ });
968
+ });
969
+
970
+ describe('#iapFindAdapterPath', () => {
971
+ it('should have a iapFindAdapterPath function', (done) => {
972
+ try {
973
+ assert.equal(true, typeof a.iapFindAdapterPath === 'function');
974
+ done();
975
+ } catch (error) {
976
+ log.error(`Test Failure: ${error}`);
977
+ done(error);
978
+ }
979
+ });
980
+ it('iapFindAdapterPath should find atleast one path that matches', (done) => {
981
+ try {
982
+ a.iapFindAdapterPath('{base_path}/{version}', (data, error) => {
983
+ try {
984
+ assert.equal(undefined, error);
985
+ assert.notEqual(undefined, data);
986
+ assert.notEqual(null, data);
987
+ assert.equal(true, data.found);
988
+ assert.notEqual(undefined, data.foundIn);
989
+ assert.notEqual(null, data.foundIn);
990
+ assert.notEqual(0, data.foundIn.length);
991
+ done();
992
+ } catch (err) {
993
+ log.error(`Test Failure: ${err}`);
994
+ done(err);
995
+ }
996
+ });
997
+ } catch (error) {
998
+ log.error(`Adapter Exception: ${error}`);
999
+ done(error);
1000
+ }
1001
+ }).timeout(attemptTimeout);
1002
+ });
1003
+
1004
+ describe('#iapSuspendAdapter', () => {
1005
+ it('should have a iapSuspendAdapter function', (done) => {
1006
+ try {
1007
+ assert.equal(true, typeof a.iapSuspendAdapter === 'function');
1008
+ done();
1009
+ } catch (error) {
1010
+ log.error(`Test Failure: ${error}`);
1011
+ done(error);
1012
+ }
1013
+ });
1014
+ });
1015
+
1016
+ describe('#iapUnsuspendAdapter', () => {
1017
+ it('should have a iapUnsuspendAdapter function', (done) => {
1018
+ try {
1019
+ assert.equal(true, typeof a.iapUnsuspendAdapter === 'function');
1020
+ done();
1021
+ } catch (error) {
1022
+ log.error(`Test Failure: ${error}`);
1023
+ done(error);
1024
+ }
1025
+ });
1026
+ });
1027
+
1028
+ describe('#iapGetAdapterQueue', () => {
1029
+ it('should have a iapGetAdapterQueue function', (done) => {
1030
+ try {
1031
+ assert.equal(true, typeof a.iapGetAdapterQueue === 'function');
1032
+ done();
1033
+ } catch (error) {
1034
+ log.error(`Test Failure: ${error}`);
1035
+ done(error);
1036
+ }
1037
+ });
1038
+ });
1039
+
1040
+ describe('#iapTroubleshootAdapter', () => {
1041
+ it('should have a iapTroubleshootAdapter function', (done) => {
1042
+ try {
1043
+ assert.equal(true, typeof a.iapTroubleshootAdapter === 'function');
1044
+ done();
1045
+ } catch (error) {
1046
+ log.error(`Test Failure: ${error}`);
1047
+ done(error);
1048
+ }
1049
+ });
1050
+ });
1051
+
1052
+ describe('#iapRunAdapterHealthcheck', () => {
1053
+ it('should have a iapRunAdapterHealthcheck function', (done) => {
1054
+ try {
1055
+ assert.equal(true, typeof a.iapRunAdapterHealthcheck === 'function');
1056
+ done();
1057
+ } catch (error) {
1058
+ log.error(`Test Failure: ${error}`);
1059
+ done(error);
1060
+ }
1061
+ });
1062
+ });
1063
+
1064
+ describe('#iapRunAdapterConnectivity', () => {
1065
+ it('should have a iapRunAdapterConnectivity function', (done) => {
1066
+ try {
1067
+ assert.equal(true, typeof a.iapRunAdapterConnectivity === 'function');
1068
+ done();
1069
+ } catch (error) {
1070
+ log.error(`Test Failure: ${error}`);
1071
+ done(error);
1072
+ }
1073
+ });
1074
+ });
1075
+
1076
+ describe('#iapRunAdapterBasicGet', () => {
1077
+ it('should have a iapRunAdapterBasicGet function', (done) => {
1078
+ try {
1079
+ assert.equal(true, typeof a.iapRunAdapterBasicGet === 'function');
1080
+ done();
1081
+ } catch (error) {
1082
+ log.error(`Test Failure: ${error}`);
1083
+ done(error);
1084
+ }
1085
+ });
1086
+ });
1087
+
1088
+ describe('#iapMoveAdapterEntitiesToDB', () => {
1089
+ it('should have a iapMoveAdapterEntitiesToDB function', (done) => {
1090
+ try {
1091
+ assert.equal(true, typeof a.iapMoveAdapterEntitiesToDB === 'function');
1092
+ done();
1093
+ } catch (error) {
1094
+ log.error(`Test Failure: ${error}`);
1095
+ done(error);
1096
+ }
1097
+ });
1098
+ });
1099
+
1100
+ describe('#checkActionFiles', () => {
1101
+ it('should have a checkActionFiles function', (done) => {
1102
+ try {
1103
+ assert.equal(true, typeof a.checkActionFiles === 'function');
1104
+ done();
1105
+ } catch (error) {
1106
+ log.error(`Test Failure: ${error}`);
1107
+ done(error);
1108
+ }
1109
+ });
1110
+ it('the action files should be good - if failure change the log level as most issues are warnings', (done) => {
1111
+ try {
1112
+ const clean = a.checkActionFiles();
1113
+
1114
+ try {
1115
+ for (let c = 0; c < clean.length; c += 1) {
1116
+ log.error(clean[c]);
1117
+ }
1118
+ assert.equal(0, clean.length);
1119
+ done();
1120
+ } catch (err) {
1121
+ log.error(`Test Failure: ${err}`);
1122
+ done(err);
1123
+ }
1124
+ } catch (error) {
1125
+ log.error(`Adapter Exception: ${error}`);
1126
+ done(error);
1127
+ }
1128
+ }).timeout(attemptTimeout);
1129
+ });
1130
+
1131
+ describe('#encryptProperty', () => {
1132
+ it('should have a encryptProperty function', (done) => {
1133
+ try {
1134
+ assert.equal(true, typeof a.encryptProperty === 'function');
1135
+ done();
1136
+ } catch (error) {
1137
+ log.error(`Test Failure: ${error}`);
1138
+ done(error);
1139
+ }
1140
+ });
1141
+ it('should get base64 encoded property', (done) => {
1142
+ try {
1143
+ a.encryptProperty('testing', 'base64', (data, error) => {
1144
+ try {
1145
+ assert.equal(undefined, error);
1146
+ assert.notEqual(undefined, data);
1147
+ assert.notEqual(null, data);
1148
+ assert.notEqual(undefined, data.response);
1149
+ assert.notEqual(null, data.response);
1150
+ assert.equal(0, data.response.indexOf('{code}'));
1151
+ done();
1152
+ } catch (err) {
1153
+ log.error(`Test Failure: ${err}`);
1154
+ done(err);
1155
+ }
1156
+ });
1157
+ } catch (error) {
1158
+ log.error(`Adapter Exception: ${error}`);
1159
+ done(error);
1160
+ }
1161
+ }).timeout(attemptTimeout);
1162
+ it('should get encrypted property', (done) => {
1163
+ try {
1164
+ a.encryptProperty('testing', 'encrypt', (data, error) => {
1165
+ try {
1166
+ assert.equal(undefined, error);
1167
+ assert.notEqual(undefined, data);
1168
+ assert.notEqual(null, data);
1169
+ assert.notEqual(undefined, data.response);
1170
+ assert.notEqual(null, data.response);
1171
+ assert.equal(0, data.response.indexOf('{crypt}'));
1172
+ done();
1173
+ } catch (err) {
1174
+ log.error(`Test Failure: ${err}`);
1175
+ done(err);
1176
+ }
1177
+ });
1178
+ } catch (error) {
1179
+ log.error(`Adapter Exception: ${error}`);
1180
+ done(error);
1181
+ }
1182
+ }).timeout(attemptTimeout);
1183
+ });
1184
+
1185
+ // describe('#iapHasAdapterEntity', () => {
1186
+ // it('should have a iapHasAdapterEntity function', (done) => {
1187
+ // try {
1188
+ // assert.equal(true, typeof a.iapHasAdapterEntity === 'function');
1189
+ // done();
1190
+ // } catch (error) {
1191
+ // log.error(`Test Failure: ${error}`);
1192
+ // done(error);
1193
+ // }
1194
+ // });
1195
+ // it('should find entity', (done) => {
1196
+ // try {
1197
+ // a.iapHasAdapterEntity('template_entity', // 'a9e9c33dc61122760072455df62663d2', (data) => {
1198
+ // try {
1199
+ // assert.equal(true, data[0]);
1200
+ // done();
1201
+ // } catch (err) {
1202
+ // log.error(`Test Failure: ${err}`);
1203
+ // done(err);
1204
+ // }
1205
+ // });
1206
+ // } catch (error) {
1207
+ // log.error(`Adapter Exception: ${error}`);
1208
+ // done(error);
1209
+ // }
1210
+ // }).timeout(attemptTimeout);
1211
+ // it('should not find entity', (done) => {
1212
+ // try {
1213
+ // a.iapHasAdapterEntity('template_entity', 'blah', (data) => {
1214
+ // try {
1215
+ // assert.equal(false, data[0]);
1216
+ // done();
1217
+ // } catch (err) {
1218
+ // log.error(`Test Failure: ${err}`);
1219
+ // done(err);
1220
+ // }
1221
+ // });
1222
+ // } catch (error) {
1223
+ // log.error(`Adapter Exception: ${error}`);
1224
+ // done(error);
1225
+ // }
1226
+ // }).timeout(attemptTimeout);
1227
+ // });
1228
+
1229
+ describe('#hasEntities', () => {
1230
+ it('should have a hasEntities function', (done) => {
1231
+ try {
1232
+ assert.equal(true, typeof a.hasEntities === 'function');
1233
+ done();
1234
+ } catch (error) {
1235
+ log.error(`Test Failure: ${error}`);
1236
+ done(error);
1237
+ }
1238
+ });
1239
+ });
1240
+
1241
+ describe('#getDevice', () => {
1242
+ it('should have a getDevice function', (done) => {
1243
+ try {
1244
+ assert.equal(true, typeof a.getDevice === 'function');
1245
+ done();
1246
+ } catch (error) {
1247
+ log.error(`Test Failure: ${error}`);
1248
+ done(error);
1249
+ }
1250
+ });
1251
+ });
1252
+
1253
+ describe('#getDevicesFiltered', () => {
1254
+ it('should have a getDevicesFiltered function', (done) => {
1255
+ try {
1256
+ assert.equal(true, typeof a.getDevicesFiltered === 'function');
1257
+ done();
1258
+ } catch (error) {
1259
+ log.error(`Test Failure: ${error}`);
1260
+ done(error);
1261
+ }
1262
+ });
1263
+ });
1264
+
1265
+ describe('#isAlive', () => {
1266
+ it('should have a isAlive function', (done) => {
1267
+ try {
1268
+ assert.equal(true, typeof a.isAlive === 'function');
1269
+ done();
1270
+ } catch (error) {
1271
+ log.error(`Test Failure: ${error}`);
1272
+ done(error);
1273
+ }
1274
+ });
1275
+ });
1276
+
1277
+ describe('#getConfig', () => {
1278
+ it('should have a getConfig function', (done) => {
1279
+ try {
1280
+ assert.equal(true, typeof a.getConfig === 'function');
1281
+ done();
1282
+ } catch (error) {
1283
+ log.error(`Test Failure: ${error}`);
1284
+ done(error);
1285
+ }
1286
+ });
1287
+ });
1288
+
1289
+ describe('#iapGetDeviceCount', () => {
1290
+ it('should have a iapGetDeviceCount function', (done) => {
1291
+ try {
1292
+ assert.equal(true, typeof a.iapGetDeviceCount === 'function');
1293
+ done();
1294
+ } catch (error) {
1295
+ log.error(`Test Failure: ${error}`);
1296
+ done(error);
1297
+ }
1298
+ });
1299
+ });
1300
+
1301
+ /*
1302
+ -----------------------------------------------------------------------
1303
+ -----------------------------------------------------------------------
1304
+ *** All code above this comment will be replaced during a migration ***
1305
+ ******************* DO NOT REMOVE THIS COMMENT BLOCK ******************
1306
+ -----------------------------------------------------------------------
1307
+ -----------------------------------------------------------------------
1308
+ */
1309
+
1310
+ describe('#getCalloutcomeSubscriberCallOutcome - errors', () => {
1311
+ it('should have a getCalloutcomeSubscriberCallOutcome function', (done) => {
1312
+ try {
1313
+ assert.equal(true, typeof a.getCalloutcomeSubscriberCallOutcome === 'function');
1314
+ done();
1315
+ } catch (error) {
1316
+ log.error(`Test Failure: ${error}`);
1317
+ done(error);
1318
+ }
1319
+ }).timeout(attemptTimeout);
1320
+ it('should error if - missing subscriberLocationId', (done) => {
1321
+ try {
1322
+ a.getCalloutcomeSubscriberCallOutcome(null, null, (data, error) => {
1323
+ try {
1324
+ const displayE = 'subscriberLocationId is required';
1325
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-getCalloutcomeSubscriberCallOutcome', displayE);
1326
+ done();
1327
+ } catch (err) {
1328
+ log.error(`Test Failure: ${err}`);
1329
+ done(err);
1330
+ }
1331
+ });
1332
+ } catch (error) {
1333
+ log.error(`Adapter Exception: ${error}`);
1334
+ done(error);
1335
+ }
1336
+ }).timeout(attemptTimeout);
1337
+ it('should error if - missing extref', (done) => {
1338
+ try {
1339
+ a.getCalloutcomeSubscriberCallOutcome('fakeparam', null, (data, error) => {
1340
+ try {
1341
+ const displayE = 'extref is required';
1342
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-getCalloutcomeSubscriberCallOutcome', displayE);
1343
+ done();
1344
+ } catch (err) {
1345
+ log.error(`Test Failure: ${err}`);
1346
+ done(err);
1347
+ }
1348
+ });
1349
+ } catch (error) {
1350
+ log.error(`Adapter Exception: ${error}`);
1351
+ done(error);
1352
+ }
1353
+ }).timeout(attemptTimeout);
1354
+ });
1355
+
1356
+ describe('#getCaleaAccessLogs - errors', () => {
1357
+ it('should have a getCaleaAccessLogs function', (done) => {
1358
+ try {
1359
+ assert.equal(true, typeof a.getCaleaAccessLogs === 'function');
1360
+ done();
1361
+ } catch (error) {
1362
+ log.error(`Test Failure: ${error}`);
1363
+ done(error);
1364
+ }
1365
+ }).timeout(attemptTimeout);
1366
+ });
1367
+
1368
+ describe('#getNetPerfTestCafIITest - errors', () => {
1369
+ it('should have a getNetPerfTestCafIITest function', (done) => {
1370
+ try {
1371
+ assert.equal(true, typeof a.getNetPerfTestCafIITest === 'function');
1372
+ done();
1373
+ } catch (error) {
1374
+ log.error(`Test Failure: ${error}`);
1375
+ done(error);
1376
+ }
1377
+ }).timeout(attemptTimeout);
1378
+ });
1379
+
1380
+ describe('#postNetPerfTestCafIITest - errors', () => {
1381
+ it('should have a postNetPerfTestCafIITest function', (done) => {
1382
+ try {
1383
+ assert.equal(true, typeof a.postNetPerfTestCafIITest === 'function');
1384
+ done();
1385
+ } catch (error) {
1386
+ log.error(`Test Failure: ${error}`);
1387
+ done(error);
1388
+ }
1389
+ }).timeout(attemptTimeout);
1390
+ it('should error if - missing body', (done) => {
1391
+ try {
1392
+ a.postNetPerfTestCafIITest(null, (data, error) => {
1393
+ try {
1394
+ const displayE = 'body is required';
1395
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-postNetPerfTestCafIITest', displayE);
1396
+ done();
1397
+ } catch (err) {
1398
+ log.error(`Test Failure: ${err}`);
1399
+ done(err);
1400
+ }
1401
+ });
1402
+ } catch (error) {
1403
+ log.error(`Adapter Exception: ${error}`);
1404
+ done(error);
1405
+ }
1406
+ }).timeout(attemptTimeout);
1407
+ });
1408
+
1409
+ describe('#getNetPerfTestCafIITestId - errors', () => {
1410
+ it('should have a getNetPerfTestCafIITestId function', (done) => {
1411
+ try {
1412
+ assert.equal(true, typeof a.getNetPerfTestCafIITestId === 'function');
1413
+ done();
1414
+ } catch (error) {
1415
+ log.error(`Test Failure: ${error}`);
1416
+ done(error);
1417
+ }
1418
+ }).timeout(attemptTimeout);
1419
+ it('should error if - missing id', (done) => {
1420
+ try {
1421
+ a.getNetPerfTestCafIITestId(null, (data, error) => {
1422
+ try {
1423
+ const displayE = 'id is required';
1424
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-getNetPerfTestCafIITestId', displayE);
1425
+ done();
1426
+ } catch (err) {
1427
+ log.error(`Test Failure: ${err}`);
1428
+ done(err);
1429
+ }
1430
+ });
1431
+ } catch (error) {
1432
+ log.error(`Adapter Exception: ${error}`);
1433
+ done(error);
1434
+ }
1435
+ }).timeout(attemptTimeout);
1436
+ });
1437
+
1438
+ describe('#putNetPerfTestCafIITestId - errors', () => {
1439
+ it('should have a putNetPerfTestCafIITestId function', (done) => {
1440
+ try {
1441
+ assert.equal(true, typeof a.putNetPerfTestCafIITestId === 'function');
1442
+ done();
1443
+ } catch (error) {
1444
+ log.error(`Test Failure: ${error}`);
1445
+ done(error);
1446
+ }
1447
+ }).timeout(attemptTimeout);
1448
+ it('should error if - missing id', (done) => {
1449
+ try {
1450
+ a.putNetPerfTestCafIITestId(null, null, (data, error) => {
1451
+ try {
1452
+ const displayE = 'id is required';
1453
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-putNetPerfTestCafIITestId', displayE);
1454
+ done();
1455
+ } catch (err) {
1456
+ log.error(`Test Failure: ${err}`);
1457
+ done(err);
1458
+ }
1459
+ });
1460
+ } catch (error) {
1461
+ log.error(`Adapter Exception: ${error}`);
1462
+ done(error);
1463
+ }
1464
+ }).timeout(attemptTimeout);
1465
+ it('should error if - missing body', (done) => {
1466
+ try {
1467
+ a.putNetPerfTestCafIITestId('fakeparam', null, (data, error) => {
1468
+ try {
1469
+ const displayE = 'body is required';
1470
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-putNetPerfTestCafIITestId', displayE);
1471
+ done();
1472
+ } catch (err) {
1473
+ log.error(`Test Failure: ${err}`);
1474
+ done(err);
1475
+ }
1476
+ });
1477
+ } catch (error) {
1478
+ log.error(`Adapter Exception: ${error}`);
1479
+ done(error);
1480
+ }
1481
+ }).timeout(attemptTimeout);
1482
+ });
1483
+
1484
+ describe('#deleteNetPerfTestCafIITestId - errors', () => {
1485
+ it('should have a deleteNetPerfTestCafIITestId function', (done) => {
1486
+ try {
1487
+ assert.equal(true, typeof a.deleteNetPerfTestCafIITestId === 'function');
1488
+ done();
1489
+ } catch (error) {
1490
+ log.error(`Test Failure: ${error}`);
1491
+ done(error);
1492
+ }
1493
+ }).timeout(attemptTimeout);
1494
+ it('should error if - missing id', (done) => {
1495
+ try {
1496
+ a.deleteNetPerfTestCafIITestId(null, (data, error) => {
1497
+ try {
1498
+ const displayE = 'id is required';
1499
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-deleteNetPerfTestCafIITestId', displayE);
1500
+ done();
1501
+ } catch (err) {
1502
+ log.error(`Test Failure: ${err}`);
1503
+ done(err);
1504
+ }
1505
+ });
1506
+ } catch (error) {
1507
+ log.error(`Adapter Exception: ${error}`);
1508
+ done(error);
1509
+ }
1510
+ }).timeout(attemptTimeout);
1511
+ });
1512
+
1513
+ describe('#putNetPerfTestCafIITestIdSuspend - errors', () => {
1514
+ it('should have a putNetPerfTestCafIITestIdSuspend function', (done) => {
1515
+ try {
1516
+ assert.equal(true, typeof a.putNetPerfTestCafIITestIdSuspend === 'function');
1517
+ done();
1518
+ } catch (error) {
1519
+ log.error(`Test Failure: ${error}`);
1520
+ done(error);
1521
+ }
1522
+ }).timeout(attemptTimeout);
1523
+ it('should error if - missing id', (done) => {
1524
+ try {
1525
+ a.putNetPerfTestCafIITestIdSuspend(null, (data, error) => {
1526
+ try {
1527
+ const displayE = 'id is required';
1528
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-putNetPerfTestCafIITestIdSuspend', displayE);
1529
+ done();
1530
+ } catch (err) {
1531
+ log.error(`Test Failure: ${err}`);
1532
+ done(err);
1533
+ }
1534
+ });
1535
+ } catch (error) {
1536
+ log.error(`Adapter Exception: ${error}`);
1537
+ done(error);
1538
+ }
1539
+ }).timeout(attemptTimeout);
1540
+ });
1541
+
1542
+ describe('#putNetPerfTestCafIITestIdResume - errors', () => {
1543
+ it('should have a putNetPerfTestCafIITestIdResume function', (done) => {
1544
+ try {
1545
+ assert.equal(true, typeof a.putNetPerfTestCafIITestIdResume === 'function');
1546
+ done();
1547
+ } catch (error) {
1548
+ log.error(`Test Failure: ${error}`);
1549
+ done(error);
1550
+ }
1551
+ }).timeout(attemptTimeout);
1552
+ it('should error if - missing id', (done) => {
1553
+ try {
1554
+ a.putNetPerfTestCafIITestIdResume(null, (data, error) => {
1555
+ try {
1556
+ const displayE = 'id is required';
1557
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-putNetPerfTestCafIITestIdResume', displayE);
1558
+ done();
1559
+ } catch (err) {
1560
+ log.error(`Test Failure: ${err}`);
1561
+ done(err);
1562
+ }
1563
+ });
1564
+ } catch (error) {
1565
+ log.error(`Adapter Exception: ${error}`);
1566
+ done(error);
1567
+ }
1568
+ }).timeout(attemptTimeout);
1569
+ });
1570
+
1571
+ describe('#getNetPerfTestOoklaServer - errors', () => {
1572
+ it('should have a getNetPerfTestOoklaServer function', (done) => {
1573
+ try {
1574
+ assert.equal(true, typeof a.getNetPerfTestOoklaServer === 'function');
1575
+ done();
1576
+ } catch (error) {
1577
+ log.error(`Test Failure: ${error}`);
1578
+ done(error);
1579
+ }
1580
+ }).timeout(attemptTimeout);
1581
+ });
1582
+
1583
+ describe('#getNetPerfTestTestResultZipExternal - errors', () => {
1584
+ it('should have a getNetPerfTestTestResultZipExternal function', (done) => {
1585
+ try {
1586
+ assert.equal(true, typeof a.getNetPerfTestTestResultZipExternal === 'function');
1587
+ done();
1588
+ } catch (error) {
1589
+ log.error(`Test Failure: ${error}`);
1590
+ done(error);
1591
+ }
1592
+ }).timeout(attemptTimeout);
1593
+ it('should error if - missing testId', (done) => {
1594
+ try {
1595
+ a.getNetPerfTestTestResultZipExternal(null, (data, error) => {
1596
+ try {
1597
+ const displayE = 'testId is required';
1598
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-getNetPerfTestTestResultZipExternal', displayE);
1599
+ done();
1600
+ } catch (err) {
1601
+ log.error(`Test Failure: ${err}`);
1602
+ done(err);
1603
+ }
1604
+ });
1605
+ } catch (error) {
1606
+ log.error(`Adapter Exception: ${error}`);
1607
+ done(error);
1608
+ }
1609
+ }).timeout(attemptTimeout);
1610
+ });
1611
+
1612
+ describe('#getBillingSubscribers - errors', () => {
1613
+ it('should have a getBillingSubscribers function', (done) => {
1614
+ try {
1615
+ assert.equal(true, typeof a.getBillingSubscribers === 'function');
1616
+ done();
1617
+ } catch (error) {
1618
+ log.error(`Test Failure: ${error}`);
1619
+ done(error);
1620
+ }
1621
+ }).timeout(attemptTimeout);
1622
+ });
1623
+
1624
+ describe('#postBillingSubscribers - errors', () => {
1625
+ it('should have a postBillingSubscribers function', (done) => {
1626
+ try {
1627
+ assert.equal(true, typeof a.postBillingSubscribers === 'function');
1628
+ done();
1629
+ } catch (error) {
1630
+ log.error(`Test Failure: ${error}`);
1631
+ done(error);
1632
+ }
1633
+ }).timeout(attemptTimeout);
1634
+ it('should error if - missing body', (done) => {
1635
+ try {
1636
+ a.postBillingSubscribers(null, (data, error) => {
1637
+ try {
1638
+ const displayE = 'body is required';
1639
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-postBillingSubscribers', displayE);
1640
+ done();
1641
+ } catch (err) {
1642
+ log.error(`Test Failure: ${err}`);
1643
+ done(err);
1644
+ }
1645
+ });
1646
+ } catch (error) {
1647
+ log.error(`Adapter Exception: ${error}`);
1648
+ done(error);
1649
+ }
1650
+ }).timeout(attemptTimeout);
1651
+ });
1652
+
1653
+ describe('#getBillingSubscribersSubscriberId - errors', () => {
1654
+ it('should have a getBillingSubscribersSubscriberId function', (done) => {
1655
+ try {
1656
+ assert.equal(true, typeof a.getBillingSubscribersSubscriberId === 'function');
1657
+ done();
1658
+ } catch (error) {
1659
+ log.error(`Test Failure: ${error}`);
1660
+ done(error);
1661
+ }
1662
+ }).timeout(attemptTimeout);
1663
+ it('should error if - missing subscriberId', (done) => {
1664
+ try {
1665
+ a.getBillingSubscribersSubscriberId(null, null, null, (data, error) => {
1666
+ try {
1667
+ const displayE = 'subscriberId is required';
1668
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-getBillingSubscribersSubscriberId', displayE);
1669
+ done();
1670
+ } catch (err) {
1671
+ log.error(`Test Failure: ${err}`);
1672
+ done(err);
1673
+ }
1674
+ });
1675
+ } catch (error) {
1676
+ log.error(`Adapter Exception: ${error}`);
1677
+ done(error);
1678
+ }
1679
+ }).timeout(attemptTimeout);
1680
+ });
1681
+
1682
+ describe('#putBillingSubscribersSubscriberId - errors', () => {
1683
+ it('should have a putBillingSubscribersSubscriberId function', (done) => {
1684
+ try {
1685
+ assert.equal(true, typeof a.putBillingSubscribersSubscriberId === 'function');
1686
+ done();
1687
+ } catch (error) {
1688
+ log.error(`Test Failure: ${error}`);
1689
+ done(error);
1690
+ }
1691
+ }).timeout(attemptTimeout);
1692
+ it('should error if - missing subscriberId', (done) => {
1693
+ try {
1694
+ a.putBillingSubscribersSubscriberId(null, null, (data, error) => {
1695
+ try {
1696
+ const displayE = 'subscriberId is required';
1697
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-putBillingSubscribersSubscriberId', displayE);
1698
+ done();
1699
+ } catch (err) {
1700
+ log.error(`Test Failure: ${err}`);
1701
+ done(err);
1702
+ }
1703
+ });
1704
+ } catch (error) {
1705
+ log.error(`Adapter Exception: ${error}`);
1706
+ done(error);
1707
+ }
1708
+ }).timeout(attemptTimeout);
1709
+ it('should error if - missing body', (done) => {
1710
+ try {
1711
+ a.putBillingSubscribersSubscriberId('fakeparam', null, (data, error) => {
1712
+ try {
1713
+ const displayE = 'body is required';
1714
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-putBillingSubscribersSubscriberId', displayE);
1715
+ done();
1716
+ } catch (err) {
1717
+ log.error(`Test Failure: ${err}`);
1718
+ done(err);
1719
+ }
1720
+ });
1721
+ } catch (error) {
1722
+ log.error(`Adapter Exception: ${error}`);
1723
+ done(error);
1724
+ }
1725
+ }).timeout(attemptTimeout);
1726
+ });
1727
+
1728
+ describe('#deleteBillingSubscribersSubscriberId - errors', () => {
1729
+ it('should have a deleteBillingSubscribersSubscriberId function', (done) => {
1730
+ try {
1731
+ assert.equal(true, typeof a.deleteBillingSubscribersSubscriberId === 'function');
1732
+ done();
1733
+ } catch (error) {
1734
+ log.error(`Test Failure: ${error}`);
1735
+ done(error);
1736
+ }
1737
+ }).timeout(attemptTimeout);
1738
+ it('should error if - missing subscriberId', (done) => {
1739
+ try {
1740
+ a.deleteBillingSubscribersSubscriberId(null, (data, error) => {
1741
+ try {
1742
+ const displayE = 'subscriberId is required';
1743
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-deleteBillingSubscribersSubscriberId', displayE);
1744
+ done();
1745
+ } catch (err) {
1746
+ log.error(`Test Failure: ${err}`);
1747
+ done(err);
1748
+ }
1749
+ });
1750
+ } catch (error) {
1751
+ log.error(`Adapter Exception: ${error}`);
1752
+ done(error);
1753
+ }
1754
+ }).timeout(attemptTimeout);
1755
+ });
1756
+
1757
+ describe('#getBillingSubscribersSubscriberIdDevices - errors', () => {
1758
+ it('should have a getBillingSubscribersSubscriberIdDevices function', (done) => {
1759
+ try {
1760
+ assert.equal(true, typeof a.getBillingSubscribersSubscriberIdDevices === 'function');
1761
+ done();
1762
+ } catch (error) {
1763
+ log.error(`Test Failure: ${error}`);
1764
+ done(error);
1765
+ }
1766
+ }).timeout(attemptTimeout);
1767
+ it('should error if - missing subscriberId', (done) => {
1768
+ try {
1769
+ a.getBillingSubscribersSubscriberIdDevices(null, (data, error) => {
1770
+ try {
1771
+ const displayE = 'subscriberId is required';
1772
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-getBillingSubscribersSubscriberIdDevices', displayE);
1773
+ done();
1774
+ } catch (err) {
1775
+ log.error(`Test Failure: ${err}`);
1776
+ done(err);
1777
+ }
1778
+ });
1779
+ } catch (error) {
1780
+ log.error(`Adapter Exception: ${error}`);
1781
+ done(error);
1782
+ }
1783
+ }).timeout(attemptTimeout);
1784
+ });
1785
+
1786
+ describe('#putBillingSubscribersSubscriberIdDevices - errors', () => {
1787
+ it('should have a putBillingSubscribersSubscriberIdDevices function', (done) => {
1788
+ try {
1789
+ assert.equal(true, typeof a.putBillingSubscribersSubscriberIdDevices === 'function');
1790
+ done();
1791
+ } catch (error) {
1792
+ log.error(`Test Failure: ${error}`);
1793
+ done(error);
1794
+ }
1795
+ }).timeout(attemptTimeout);
1796
+ it('should error if - missing subscriberId', (done) => {
1797
+ try {
1798
+ a.putBillingSubscribersSubscriberIdDevices(null, null, (data, error) => {
1799
+ try {
1800
+ const displayE = 'subscriberId is required';
1801
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-putBillingSubscribersSubscriberIdDevices', displayE);
1802
+ done();
1803
+ } catch (err) {
1804
+ log.error(`Test Failure: ${err}`);
1805
+ done(err);
1806
+ }
1807
+ });
1808
+ } catch (error) {
1809
+ log.error(`Adapter Exception: ${error}`);
1810
+ done(error);
1811
+ }
1812
+ }).timeout(attemptTimeout);
1813
+ it('should error if - missing deviceList', (done) => {
1814
+ try {
1815
+ a.putBillingSubscribersSubscriberIdDevices('fakeparam', null, (data, error) => {
1816
+ try {
1817
+ const displayE = 'deviceList is required';
1818
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-putBillingSubscribersSubscriberIdDevices', displayE);
1819
+ done();
1820
+ } catch (err) {
1821
+ log.error(`Test Failure: ${err}`);
1822
+ done(err);
1823
+ }
1824
+ });
1825
+ } catch (error) {
1826
+ log.error(`Adapter Exception: ${error}`);
1827
+ done(error);
1828
+ }
1829
+ }).timeout(attemptTimeout);
1830
+ });
1831
+
1832
+ describe('#postBillingSubscribersSubscriberIdDevices - errors', () => {
1833
+ it('should have a postBillingSubscribersSubscriberIdDevices function', (done) => {
1834
+ try {
1835
+ assert.equal(true, typeof a.postBillingSubscribersSubscriberIdDevices === 'function');
1836
+ done();
1837
+ } catch (error) {
1838
+ log.error(`Test Failure: ${error}`);
1839
+ done(error);
1840
+ }
1841
+ }).timeout(attemptTimeout);
1842
+ it('should error if - missing subscriberId', (done) => {
1843
+ try {
1844
+ a.postBillingSubscribersSubscriberIdDevices(null, null, (data, error) => {
1845
+ try {
1846
+ const displayE = 'subscriberId is required';
1847
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-postBillingSubscribersSubscriberIdDevices', displayE);
1848
+ done();
1849
+ } catch (err) {
1850
+ log.error(`Test Failure: ${err}`);
1851
+ done(err);
1852
+ }
1853
+ });
1854
+ } catch (error) {
1855
+ log.error(`Adapter Exception: ${error}`);
1856
+ done(error);
1857
+ }
1858
+ }).timeout(attemptTimeout);
1859
+ it('should error if - missing deviceId', (done) => {
1860
+ try {
1861
+ a.postBillingSubscribersSubscriberIdDevices('fakeparam', null, (data, error) => {
1862
+ try {
1863
+ const displayE = 'deviceId is required';
1864
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-postBillingSubscribersSubscriberIdDevices', displayE);
1865
+ done();
1866
+ } catch (err) {
1867
+ log.error(`Test Failure: ${err}`);
1868
+ done(err);
1869
+ }
1870
+ });
1871
+ } catch (error) {
1872
+ log.error(`Adapter Exception: ${error}`);
1873
+ done(error);
1874
+ }
1875
+ }).timeout(attemptTimeout);
1876
+ });
1877
+
1878
+ describe('#putBillingSubscribersSubscriberIdDevicesDeviceId - errors', () => {
1879
+ it('should have a putBillingSubscribersSubscriberIdDevicesDeviceId function', (done) => {
1880
+ try {
1881
+ assert.equal(true, typeof a.putBillingSubscribersSubscriberIdDevicesDeviceId === 'function');
1882
+ done();
1883
+ } catch (error) {
1884
+ log.error(`Test Failure: ${error}`);
1885
+ done(error);
1886
+ }
1887
+ }).timeout(attemptTimeout);
1888
+ it('should error if - missing subscriberId', (done) => {
1889
+ try {
1890
+ a.putBillingSubscribersSubscriberIdDevicesDeviceId(null, null, null, (data, error) => {
1891
+ try {
1892
+ const displayE = 'subscriberId is required';
1893
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-putBillingSubscribersSubscriberIdDevicesDeviceId', displayE);
1894
+ done();
1895
+ } catch (err) {
1896
+ log.error(`Test Failure: ${err}`);
1897
+ done(err);
1898
+ }
1899
+ });
1900
+ } catch (error) {
1901
+ log.error(`Adapter Exception: ${error}`);
1902
+ done(error);
1903
+ }
1904
+ }).timeout(attemptTimeout);
1905
+ it('should error if - missing deviceId', (done) => {
1906
+ try {
1907
+ a.putBillingSubscribersSubscriberIdDevicesDeviceId('fakeparam', null, null, (data, error) => {
1908
+ try {
1909
+ const displayE = 'deviceId is required';
1910
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-putBillingSubscribersSubscriberIdDevicesDeviceId', displayE);
1911
+ done();
1912
+ } catch (err) {
1913
+ log.error(`Test Failure: ${err}`);
1914
+ done(err);
1915
+ }
1916
+ });
1917
+ } catch (error) {
1918
+ log.error(`Adapter Exception: ${error}`);
1919
+ done(error);
1920
+ }
1921
+ }).timeout(attemptTimeout);
1922
+ it('should error if - missing newDeviceId', (done) => {
1923
+ try {
1924
+ a.putBillingSubscribersSubscriberIdDevicesDeviceId('fakeparam', 'fakeparam', null, (data, error) => {
1925
+ try {
1926
+ const displayE = 'newDeviceId is required';
1927
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-putBillingSubscribersSubscriberIdDevicesDeviceId', displayE);
1928
+ done();
1929
+ } catch (err) {
1930
+ log.error(`Test Failure: ${err}`);
1931
+ done(err);
1932
+ }
1933
+ });
1934
+ } catch (error) {
1935
+ log.error(`Adapter Exception: ${error}`);
1936
+ done(error);
1937
+ }
1938
+ }).timeout(attemptTimeout);
1939
+ });
1940
+
1941
+ describe('#deleteBillingSubscribersSubscriberIdDevicesDeviceId - errors', () => {
1942
+ it('should have a deleteBillingSubscribersSubscriberIdDevicesDeviceId function', (done) => {
1943
+ try {
1944
+ assert.equal(true, typeof a.deleteBillingSubscribersSubscriberIdDevicesDeviceId === 'function');
1945
+ done();
1946
+ } catch (error) {
1947
+ log.error(`Test Failure: ${error}`);
1948
+ done(error);
1949
+ }
1950
+ }).timeout(attemptTimeout);
1951
+ it('should error if - missing subscriberId', (done) => {
1952
+ try {
1953
+ a.deleteBillingSubscribersSubscriberIdDevicesDeviceId(null, null, (data, error) => {
1954
+ try {
1955
+ const displayE = 'subscriberId is required';
1956
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-deleteBillingSubscribersSubscriberIdDevicesDeviceId', displayE);
1957
+ done();
1958
+ } catch (err) {
1959
+ log.error(`Test Failure: ${err}`);
1960
+ done(err);
1961
+ }
1962
+ });
1963
+ } catch (error) {
1964
+ log.error(`Adapter Exception: ${error}`);
1965
+ done(error);
1966
+ }
1967
+ }).timeout(attemptTimeout);
1968
+ it('should error if - missing deviceId', (done) => {
1969
+ try {
1970
+ a.deleteBillingSubscribersSubscriberIdDevicesDeviceId('fakeparam', null, (data, error) => {
1971
+ try {
1972
+ const displayE = 'deviceId is required';
1973
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-deleteBillingSubscribersSubscriberIdDevicesDeviceId', displayE);
1974
+ done();
1975
+ } catch (err) {
1976
+ log.error(`Test Failure: ${err}`);
1977
+ done(err);
1978
+ }
1979
+ });
1980
+ } catch (error) {
1981
+ log.error(`Adapter Exception: ${error}`);
1982
+ done(error);
1983
+ }
1984
+ }).timeout(attemptTimeout);
1985
+ });
1986
+
1987
+ describe('#getBillingSubscribersSubscriberIdFccIdentifiers - errors', () => {
1988
+ it('should have a getBillingSubscribersSubscriberIdFccIdentifiers function', (done) => {
1989
+ try {
1990
+ assert.equal(true, typeof a.getBillingSubscribersSubscriberIdFccIdentifiers === 'function');
1991
+ done();
1992
+ } catch (error) {
1993
+ log.error(`Test Failure: ${error}`);
1994
+ done(error);
1995
+ }
1996
+ }).timeout(attemptTimeout);
1997
+ it('should error if - missing subscriberId', (done) => {
1998
+ try {
1999
+ a.getBillingSubscribersSubscriberIdFccIdentifiers(null, (data, error) => {
2000
+ try {
2001
+ const displayE = 'subscriberId is required';
2002
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-getBillingSubscribersSubscriberIdFccIdentifiers', displayE);
2003
+ done();
2004
+ } catch (err) {
2005
+ log.error(`Test Failure: ${err}`);
2006
+ done(err);
2007
+ }
2008
+ });
2009
+ } catch (error) {
2010
+ log.error(`Adapter Exception: ${error}`);
2011
+ done(error);
2012
+ }
2013
+ }).timeout(attemptTimeout);
2014
+ });
2015
+
2016
+ describe('#putBillingSubscribersSubscriberIdFccIdentifiers - errors', () => {
2017
+ it('should have a putBillingSubscribersSubscriberIdFccIdentifiers function', (done) => {
2018
+ try {
2019
+ assert.equal(true, typeof a.putBillingSubscribersSubscriberIdFccIdentifiers === 'function');
2020
+ done();
2021
+ } catch (error) {
2022
+ log.error(`Test Failure: ${error}`);
2023
+ done(error);
2024
+ }
2025
+ }).timeout(attemptTimeout);
2026
+ it('should error if - missing subscriberId', (done) => {
2027
+ try {
2028
+ a.putBillingSubscribersSubscriberIdFccIdentifiers(null, null, (data, error) => {
2029
+ try {
2030
+ const displayE = 'subscriberId is required';
2031
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-putBillingSubscribersSubscriberIdFccIdentifiers', displayE);
2032
+ done();
2033
+ } catch (err) {
2034
+ log.error(`Test Failure: ${err}`);
2035
+ done(err);
2036
+ }
2037
+ });
2038
+ } catch (error) {
2039
+ log.error(`Adapter Exception: ${error}`);
2040
+ done(error);
2041
+ }
2042
+ }).timeout(attemptTimeout);
2043
+ it('should error if - missing body', (done) => {
2044
+ try {
2045
+ a.putBillingSubscribersSubscriberIdFccIdentifiers('fakeparam', null, (data, error) => {
2046
+ try {
2047
+ const displayE = 'body is required';
2048
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-putBillingSubscribersSubscriberIdFccIdentifiers', displayE);
2049
+ done();
2050
+ } catch (err) {
2051
+ log.error(`Test Failure: ${err}`);
2052
+ done(err);
2053
+ }
2054
+ });
2055
+ } catch (error) {
2056
+ log.error(`Adapter Exception: ${error}`);
2057
+ done(error);
2058
+ }
2059
+ }).timeout(attemptTimeout);
2060
+ });
2061
+
2062
+ describe('#postBillingSubscribersSubscriberIdFccIdentifiers - errors', () => {
2063
+ it('should have a postBillingSubscribersSubscriberIdFccIdentifiers function', (done) => {
2064
+ try {
2065
+ assert.equal(true, typeof a.postBillingSubscribersSubscriberIdFccIdentifiers === 'function');
2066
+ done();
2067
+ } catch (error) {
2068
+ log.error(`Test Failure: ${error}`);
2069
+ done(error);
2070
+ }
2071
+ }).timeout(attemptTimeout);
2072
+ it('should error if - missing subscriberId', (done) => {
2073
+ try {
2074
+ a.postBillingSubscribersSubscriberIdFccIdentifiers(null, null, (data, error) => {
2075
+ try {
2076
+ const displayE = 'subscriberId is required';
2077
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-postBillingSubscribersSubscriberIdFccIdentifiers', displayE);
2078
+ done();
2079
+ } catch (err) {
2080
+ log.error(`Test Failure: ${err}`);
2081
+ done(err);
2082
+ }
2083
+ });
2084
+ } catch (error) {
2085
+ log.error(`Adapter Exception: ${error}`);
2086
+ done(error);
2087
+ }
2088
+ }).timeout(attemptTimeout);
2089
+ it('should error if - missing body', (done) => {
2090
+ try {
2091
+ a.postBillingSubscribersSubscriberIdFccIdentifiers('fakeparam', null, (data, error) => {
2092
+ try {
2093
+ const displayE = 'body is required';
2094
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-postBillingSubscribersSubscriberIdFccIdentifiers', displayE);
2095
+ done();
2096
+ } catch (err) {
2097
+ log.error(`Test Failure: ${err}`);
2098
+ done(err);
2099
+ }
2100
+ });
2101
+ } catch (error) {
2102
+ log.error(`Adapter Exception: ${error}`);
2103
+ done(error);
2104
+ }
2105
+ }).timeout(attemptTimeout);
2106
+ });
2107
+
2108
+ describe('#deleteBillingSubscribersSubscriberIdFccIdentifiers - errors', () => {
2109
+ it('should have a deleteBillingSubscribersSubscriberIdFccIdentifiers function', (done) => {
2110
+ try {
2111
+ assert.equal(true, typeof a.deleteBillingSubscribersSubscriberIdFccIdentifiers === 'function');
2112
+ done();
2113
+ } catch (error) {
2114
+ log.error(`Test Failure: ${error}`);
2115
+ done(error);
2116
+ }
2117
+ }).timeout(attemptTimeout);
2118
+ it('should error if - missing subscriberId', (done) => {
2119
+ try {
2120
+ a.deleteBillingSubscribersSubscriberIdFccIdentifiers(null, (data, error) => {
2121
+ try {
2122
+ const displayE = 'subscriberId is required';
2123
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-deleteBillingSubscribersSubscriberIdFccIdentifiers', displayE);
2124
+ done();
2125
+ } catch (err) {
2126
+ log.error(`Test Failure: ${err}`);
2127
+ done(err);
2128
+ }
2129
+ });
2130
+ } catch (error) {
2131
+ log.error(`Adapter Exception: ${error}`);
2132
+ done(error);
2133
+ }
2134
+ }).timeout(attemptTimeout);
2135
+ });
2136
+
2137
+ describe('#getBillingSubscribersSubscriberIdServices - errors', () => {
2138
+ it('should have a getBillingSubscribersSubscriberIdServices function', (done) => {
2139
+ try {
2140
+ assert.equal(true, typeof a.getBillingSubscribersSubscriberIdServices === 'function');
2141
+ done();
2142
+ } catch (error) {
2143
+ log.error(`Test Failure: ${error}`);
2144
+ done(error);
2145
+ }
2146
+ }).timeout(attemptTimeout);
2147
+ it('should error if - missing subscriberId', (done) => {
2148
+ try {
2149
+ a.getBillingSubscribersSubscriberIdServices(null, null, (data, error) => {
2150
+ try {
2151
+ const displayE = 'subscriberId is required';
2152
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-getBillingSubscribersSubscriberIdServices', displayE);
2153
+ done();
2154
+ } catch (err) {
2155
+ log.error(`Test Failure: ${err}`);
2156
+ done(err);
2157
+ }
2158
+ });
2159
+ } catch (error) {
2160
+ log.error(`Adapter Exception: ${error}`);
2161
+ done(error);
2162
+ }
2163
+ }).timeout(attemptTimeout);
2164
+ });
2165
+
2166
+ describe('#putBillingSubscribersSubscriberIdServices - errors', () => {
2167
+ it('should have a putBillingSubscribersSubscriberIdServices function', (done) => {
2168
+ try {
2169
+ assert.equal(true, typeof a.putBillingSubscribersSubscriberIdServices === 'function');
2170
+ done();
2171
+ } catch (error) {
2172
+ log.error(`Test Failure: ${error}`);
2173
+ done(error);
2174
+ }
2175
+ }).timeout(attemptTimeout);
2176
+ it('should error if - missing subscriberId', (done) => {
2177
+ try {
2178
+ a.putBillingSubscribersSubscriberIdServices(null, null, null, (data, error) => {
2179
+ try {
2180
+ const displayE = 'subscriberId is required';
2181
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-putBillingSubscribersSubscriberIdServices', displayE);
2182
+ done();
2183
+ } catch (err) {
2184
+ log.error(`Test Failure: ${err}`);
2185
+ done(err);
2186
+ }
2187
+ });
2188
+ } catch (error) {
2189
+ log.error(`Adapter Exception: ${error}`);
2190
+ done(error);
2191
+ }
2192
+ }).timeout(attemptTimeout);
2193
+ it('should error if - missing body', (done) => {
2194
+ try {
2195
+ a.putBillingSubscribersSubscriberIdServices('fakeparam', 'fakeparam', null, (data, error) => {
2196
+ try {
2197
+ const displayE = 'body is required';
2198
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-putBillingSubscribersSubscriberIdServices', displayE);
2199
+ done();
2200
+ } catch (err) {
2201
+ log.error(`Test Failure: ${err}`);
2202
+ done(err);
2203
+ }
2204
+ });
2205
+ } catch (error) {
2206
+ log.error(`Adapter Exception: ${error}`);
2207
+ done(error);
2208
+ }
2209
+ }).timeout(attemptTimeout);
2210
+ });
2211
+
2212
+ describe('#postBillingSubscribersSubscriberIdServices - errors', () => {
2213
+ it('should have a postBillingSubscribersSubscriberIdServices function', (done) => {
2214
+ try {
2215
+ assert.equal(true, typeof a.postBillingSubscribersSubscriberIdServices === 'function');
2216
+ done();
2217
+ } catch (error) {
2218
+ log.error(`Test Failure: ${error}`);
2219
+ done(error);
2220
+ }
2221
+ }).timeout(attemptTimeout);
2222
+ it('should error if - missing subscriberId', (done) => {
2223
+ try {
2224
+ a.postBillingSubscribersSubscriberIdServices(null, null, (data, error) => {
2225
+ try {
2226
+ const displayE = 'subscriberId is required';
2227
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-postBillingSubscribersSubscriberIdServices', displayE);
2228
+ done();
2229
+ } catch (err) {
2230
+ log.error(`Test Failure: ${err}`);
2231
+ done(err);
2232
+ }
2233
+ });
2234
+ } catch (error) {
2235
+ log.error(`Adapter Exception: ${error}`);
2236
+ done(error);
2237
+ }
2238
+ }).timeout(attemptTimeout);
2239
+ it('should error if - missing body', (done) => {
2240
+ try {
2241
+ a.postBillingSubscribersSubscriberIdServices('fakeparam', null, (data, error) => {
2242
+ try {
2243
+ const displayE = 'body is required';
2244
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-postBillingSubscribersSubscriberIdServices', displayE);
2245
+ done();
2246
+ } catch (err) {
2247
+ log.error(`Test Failure: ${err}`);
2248
+ done(err);
2249
+ }
2250
+ });
2251
+ } catch (error) {
2252
+ log.error(`Adapter Exception: ${error}`);
2253
+ done(error);
2254
+ }
2255
+ }).timeout(attemptTimeout);
2256
+ });
2257
+
2258
+ describe('#getBillingSubscribersSubscriberIdServicesServiceId - errors', () => {
2259
+ it('should have a getBillingSubscribersSubscriberIdServicesServiceId function', (done) => {
2260
+ try {
2261
+ assert.equal(true, typeof a.getBillingSubscribersSubscriberIdServicesServiceId === 'function');
2262
+ done();
2263
+ } catch (error) {
2264
+ log.error(`Test Failure: ${error}`);
2265
+ done(error);
2266
+ }
2267
+ }).timeout(attemptTimeout);
2268
+ it('should error if - missing subscriberId', (done) => {
2269
+ try {
2270
+ a.getBillingSubscribersSubscriberIdServicesServiceId(null, null, (data, error) => {
2271
+ try {
2272
+ const displayE = 'subscriberId is required';
2273
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-getBillingSubscribersSubscriberIdServicesServiceId', displayE);
2274
+ done();
2275
+ } catch (err) {
2276
+ log.error(`Test Failure: ${err}`);
2277
+ done(err);
2278
+ }
2279
+ });
2280
+ } catch (error) {
2281
+ log.error(`Adapter Exception: ${error}`);
2282
+ done(error);
2283
+ }
2284
+ }).timeout(attemptTimeout);
2285
+ it('should error if - missing serviceId', (done) => {
2286
+ try {
2287
+ a.getBillingSubscribersSubscriberIdServicesServiceId('fakeparam', null, (data, error) => {
2288
+ try {
2289
+ const displayE = 'serviceId is required';
2290
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-getBillingSubscribersSubscriberIdServicesServiceId', displayE);
2291
+ done();
2292
+ } catch (err) {
2293
+ log.error(`Test Failure: ${err}`);
2294
+ done(err);
2295
+ }
2296
+ });
2297
+ } catch (error) {
2298
+ log.error(`Adapter Exception: ${error}`);
2299
+ done(error);
2300
+ }
2301
+ }).timeout(attemptTimeout);
2302
+ });
2303
+
2304
+ describe('#putBillingSubscribersSubscriberIdServicesServiceId - errors', () => {
2305
+ it('should have a putBillingSubscribersSubscriberIdServicesServiceId function', (done) => {
2306
+ try {
2307
+ assert.equal(true, typeof a.putBillingSubscribersSubscriberIdServicesServiceId === 'function');
2308
+ done();
2309
+ } catch (error) {
2310
+ log.error(`Test Failure: ${error}`);
2311
+ done(error);
2312
+ }
2313
+ }).timeout(attemptTimeout);
2314
+ it('should error if - missing subscriberId', (done) => {
2315
+ try {
2316
+ a.putBillingSubscribersSubscriberIdServicesServiceId(null, null, null, (data, error) => {
2317
+ try {
2318
+ const displayE = 'subscriberId is required';
2319
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-putBillingSubscribersSubscriberIdServicesServiceId', displayE);
2320
+ done();
2321
+ } catch (err) {
2322
+ log.error(`Test Failure: ${err}`);
2323
+ done(err);
2324
+ }
2325
+ });
2326
+ } catch (error) {
2327
+ log.error(`Adapter Exception: ${error}`);
2328
+ done(error);
2329
+ }
2330
+ }).timeout(attemptTimeout);
2331
+ it('should error if - missing serviceId', (done) => {
2332
+ try {
2333
+ a.putBillingSubscribersSubscriberIdServicesServiceId('fakeparam', null, null, (data, error) => {
2334
+ try {
2335
+ const displayE = 'serviceId is required';
2336
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-putBillingSubscribersSubscriberIdServicesServiceId', displayE);
2337
+ done();
2338
+ } catch (err) {
2339
+ log.error(`Test Failure: ${err}`);
2340
+ done(err);
2341
+ }
2342
+ });
2343
+ } catch (error) {
2344
+ log.error(`Adapter Exception: ${error}`);
2345
+ done(error);
2346
+ }
2347
+ }).timeout(attemptTimeout);
2348
+ it('should error if - missing body', (done) => {
2349
+ try {
2350
+ a.putBillingSubscribersSubscriberIdServicesServiceId('fakeparam', 'fakeparam', null, (data, error) => {
2351
+ try {
2352
+ const displayE = 'body is required';
2353
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-putBillingSubscribersSubscriberIdServicesServiceId', displayE);
2354
+ done();
2355
+ } catch (err) {
2356
+ log.error(`Test Failure: ${err}`);
2357
+ done(err);
2358
+ }
2359
+ });
2360
+ } catch (error) {
2361
+ log.error(`Adapter Exception: ${error}`);
2362
+ done(error);
2363
+ }
2364
+ }).timeout(attemptTimeout);
2365
+ });
2366
+
2367
+ describe('#deleteBillingSubscribersSubscriberIdServicesServiceId - errors', () => {
2368
+ it('should have a deleteBillingSubscribersSubscriberIdServicesServiceId function', (done) => {
2369
+ try {
2370
+ assert.equal(true, typeof a.deleteBillingSubscribersSubscriberIdServicesServiceId === 'function');
2371
+ done();
2372
+ } catch (error) {
2373
+ log.error(`Test Failure: ${error}`);
2374
+ done(error);
2375
+ }
2376
+ }).timeout(attemptTimeout);
2377
+ it('should error if - missing subscriberId', (done) => {
2378
+ try {
2379
+ a.deleteBillingSubscribersSubscriberIdServicesServiceId(null, null, (data, error) => {
2380
+ try {
2381
+ const displayE = 'subscriberId is required';
2382
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-deleteBillingSubscribersSubscriberIdServicesServiceId', displayE);
2383
+ done();
2384
+ } catch (err) {
2385
+ log.error(`Test Failure: ${err}`);
2386
+ done(err);
2387
+ }
2388
+ });
2389
+ } catch (error) {
2390
+ log.error(`Adapter Exception: ${error}`);
2391
+ done(error);
2392
+ }
2393
+ }).timeout(attemptTimeout);
2394
+ it('should error if - missing serviceId', (done) => {
2395
+ try {
2396
+ a.deleteBillingSubscribersSubscriberIdServicesServiceId('fakeparam', null, (data, error) => {
2397
+ try {
2398
+ const displayE = 'serviceId is required';
2399
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-deleteBillingSubscribersSubscriberIdServicesServiceId', displayE);
2400
+ done();
2401
+ } catch (err) {
2402
+ log.error(`Test Failure: ${err}`);
2403
+ done(err);
2404
+ }
2405
+ });
2406
+ } catch (error) {
2407
+ log.error(`Adapter Exception: ${error}`);
2408
+ done(error);
2409
+ }
2410
+ }).timeout(attemptTimeout);
2411
+ });
2412
+
2413
+ describe('#getBillingSubscribersSubscriberIdServicesStatus - errors', () => {
2414
+ it('should have a getBillingSubscribersSubscriberIdServicesStatus function', (done) => {
2415
+ try {
2416
+ assert.equal(true, typeof a.getBillingSubscribersSubscriberIdServicesStatus === 'function');
2417
+ done();
2418
+ } catch (error) {
2419
+ log.error(`Test Failure: ${error}`);
2420
+ done(error);
2421
+ }
2422
+ }).timeout(attemptTimeout);
2423
+ it('should error if - missing subscriberId', (done) => {
2424
+ try {
2425
+ a.getBillingSubscribersSubscriberIdServicesStatus(null, (data, error) => {
2426
+ try {
2427
+ const displayE = 'subscriberId is required';
2428
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-getBillingSubscribersSubscriberIdServicesStatus', displayE);
2429
+ done();
2430
+ } catch (err) {
2431
+ log.error(`Test Failure: ${err}`);
2432
+ done(err);
2433
+ }
2434
+ });
2435
+ } catch (error) {
2436
+ log.error(`Adapter Exception: ${error}`);
2437
+ done(error);
2438
+ }
2439
+ }).timeout(attemptTimeout);
2440
+ });
2441
+
2442
+ describe('#getBillingSubscribersSubscriberIdAppServices - errors', () => {
2443
+ it('should have a getBillingSubscribersSubscriberIdAppServices function', (done) => {
2444
+ try {
2445
+ assert.equal(true, typeof a.getBillingSubscribersSubscriberIdAppServices === 'function');
2446
+ done();
2447
+ } catch (error) {
2448
+ log.error(`Test Failure: ${error}`);
2449
+ done(error);
2450
+ }
2451
+ }).timeout(attemptTimeout);
2452
+ it('should error if - missing subscriberId', (done) => {
2453
+ try {
2454
+ a.getBillingSubscribersSubscriberIdAppServices(null, (data, error) => {
2455
+ try {
2456
+ const displayE = 'subscriberId is required';
2457
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-getBillingSubscribersSubscriberIdAppServices', displayE);
2458
+ done();
2459
+ } catch (err) {
2460
+ log.error(`Test Failure: ${err}`);
2461
+ done(err);
2462
+ }
2463
+ });
2464
+ } catch (error) {
2465
+ log.error(`Adapter Exception: ${error}`);
2466
+ done(error);
2467
+ }
2468
+ }).timeout(attemptTimeout);
2469
+ });
2470
+
2471
+ describe('#getBillingSubscribersSubscriberIdAppServicesAppServiceName - errors', () => {
2472
+ it('should have a getBillingSubscribersSubscriberIdAppServicesAppServiceName function', (done) => {
2473
+ try {
2474
+ assert.equal(true, typeof a.getBillingSubscribersSubscriberIdAppServicesAppServiceName === 'function');
2475
+ done();
2476
+ } catch (error) {
2477
+ log.error(`Test Failure: ${error}`);
2478
+ done(error);
2479
+ }
2480
+ }).timeout(attemptTimeout);
2481
+ it('should error if - missing subscriberId', (done) => {
2482
+ try {
2483
+ a.getBillingSubscribersSubscriberIdAppServicesAppServiceName(null, null, (data, error) => {
2484
+ try {
2485
+ const displayE = 'subscriberId is required';
2486
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-getBillingSubscribersSubscriberIdAppServicesAppServiceName', displayE);
2487
+ done();
2488
+ } catch (err) {
2489
+ log.error(`Test Failure: ${err}`);
2490
+ done(err);
2491
+ }
2492
+ });
2493
+ } catch (error) {
2494
+ log.error(`Adapter Exception: ${error}`);
2495
+ done(error);
2496
+ }
2497
+ }).timeout(attemptTimeout);
2498
+ it('should error if - missing appServiceName', (done) => {
2499
+ try {
2500
+ a.getBillingSubscribersSubscriberIdAppServicesAppServiceName('fakeparam', null, (data, error) => {
2501
+ try {
2502
+ const displayE = 'appServiceName is required';
2503
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-getBillingSubscribersSubscriberIdAppServicesAppServiceName', displayE);
2504
+ done();
2505
+ } catch (err) {
2506
+ log.error(`Test Failure: ${err}`);
2507
+ done(err);
2508
+ }
2509
+ });
2510
+ } catch (error) {
2511
+ log.error(`Adapter Exception: ${error}`);
2512
+ done(error);
2513
+ }
2514
+ }).timeout(attemptTimeout);
2515
+ });
2516
+
2517
+ describe('#putBillingSubscribersSubscriberIdAppServicesAppServiceName - errors', () => {
2518
+ it('should have a putBillingSubscribersSubscriberIdAppServicesAppServiceName function', (done) => {
2519
+ try {
2520
+ assert.equal(true, typeof a.putBillingSubscribersSubscriberIdAppServicesAppServiceName === 'function');
2521
+ done();
2522
+ } catch (error) {
2523
+ log.error(`Test Failure: ${error}`);
2524
+ done(error);
2525
+ }
2526
+ }).timeout(attemptTimeout);
2527
+ it('should error if - missing subscriberId', (done) => {
2528
+ try {
2529
+ a.putBillingSubscribersSubscriberIdAppServicesAppServiceName(null, null, null, (data, error) => {
2530
+ try {
2531
+ const displayE = 'subscriberId is required';
2532
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-putBillingSubscribersSubscriberIdAppServicesAppServiceName', displayE);
2533
+ done();
2534
+ } catch (err) {
2535
+ log.error(`Test Failure: ${err}`);
2536
+ done(err);
2537
+ }
2538
+ });
2539
+ } catch (error) {
2540
+ log.error(`Adapter Exception: ${error}`);
2541
+ done(error);
2542
+ }
2543
+ }).timeout(attemptTimeout);
2544
+ it('should error if - missing appServiceName', (done) => {
2545
+ try {
2546
+ a.putBillingSubscribersSubscriberIdAppServicesAppServiceName('fakeparam', null, null, (data, error) => {
2547
+ try {
2548
+ const displayE = 'appServiceName is required';
2549
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-putBillingSubscribersSubscriberIdAppServicesAppServiceName', displayE);
2550
+ done();
2551
+ } catch (err) {
2552
+ log.error(`Test Failure: ${err}`);
2553
+ done(err);
2554
+ }
2555
+ });
2556
+ } catch (error) {
2557
+ log.error(`Adapter Exception: ${error}`);
2558
+ done(error);
2559
+ }
2560
+ }).timeout(attemptTimeout);
2561
+ it('should error if - missing body', (done) => {
2562
+ try {
2563
+ a.putBillingSubscribersSubscriberIdAppServicesAppServiceName('fakeparam', 'fakeparam', null, (data, error) => {
2564
+ try {
2565
+ const displayE = 'body is required';
2566
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-putBillingSubscribersSubscriberIdAppServicesAppServiceName', displayE);
2567
+ done();
2568
+ } catch (err) {
2569
+ log.error(`Test Failure: ${err}`);
2570
+ done(err);
2571
+ }
2572
+ });
2573
+ } catch (error) {
2574
+ log.error(`Adapter Exception: ${error}`);
2575
+ done(error);
2576
+ }
2577
+ }).timeout(attemptTimeout);
2578
+ });
2579
+
2580
+ describe('#getBillingSubscribersSubscriberIdArloService - errors', () => {
2581
+ it('should have a getBillingSubscribersSubscriberIdArloService function', (done) => {
2582
+ try {
2583
+ assert.equal(true, typeof a.getBillingSubscribersSubscriberIdArloService === 'function');
2584
+ done();
2585
+ } catch (error) {
2586
+ log.error(`Test Failure: ${error}`);
2587
+ done(error);
2588
+ }
2589
+ }).timeout(attemptTimeout);
2590
+ it('should error if - missing subscriberId', (done) => {
2591
+ try {
2592
+ a.getBillingSubscribersSubscriberIdArloService(null, (data, error) => {
2593
+ try {
2594
+ const displayE = 'subscriberId is required';
2595
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-getBillingSubscribersSubscriberIdArloService', displayE);
2596
+ done();
2597
+ } catch (err) {
2598
+ log.error(`Test Failure: ${err}`);
2599
+ done(err);
2600
+ }
2601
+ });
2602
+ } catch (error) {
2603
+ log.error(`Adapter Exception: ${error}`);
2604
+ done(error);
2605
+ }
2606
+ }).timeout(attemptTimeout);
2607
+ });
2608
+
2609
+ describe('#putBillingSubscribersSubscriberIdArloService - errors', () => {
2610
+ it('should have a putBillingSubscribersSubscriberIdArloService function', (done) => {
2611
+ try {
2612
+ assert.equal(true, typeof a.putBillingSubscribersSubscriberIdArloService === 'function');
2613
+ done();
2614
+ } catch (error) {
2615
+ log.error(`Test Failure: ${error}`);
2616
+ done(error);
2617
+ }
2618
+ }).timeout(attemptTimeout);
2619
+ it('should error if - missing subscriberId', (done) => {
2620
+ try {
2621
+ a.putBillingSubscribersSubscriberIdArloService(null, null, (data, error) => {
2622
+ try {
2623
+ const displayE = 'subscriberId is required';
2624
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-putBillingSubscribersSubscriberIdArloService', displayE);
2625
+ done();
2626
+ } catch (err) {
2627
+ log.error(`Test Failure: ${err}`);
2628
+ done(err);
2629
+ }
2630
+ });
2631
+ } catch (error) {
2632
+ log.error(`Adapter Exception: ${error}`);
2633
+ done(error);
2634
+ }
2635
+ }).timeout(attemptTimeout);
2636
+ it('should error if - missing body', (done) => {
2637
+ try {
2638
+ a.putBillingSubscribersSubscriberIdArloService('fakeparam', null, (data, error) => {
2639
+ try {
2640
+ const displayE = 'body is required';
2641
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-putBillingSubscribersSubscriberIdArloService', displayE);
2642
+ done();
2643
+ } catch (err) {
2644
+ log.error(`Test Failure: ${err}`);
2645
+ done(err);
2646
+ }
2647
+ });
2648
+ } catch (error) {
2649
+ log.error(`Adapter Exception: ${error}`);
2650
+ done(error);
2651
+ }
2652
+ }).timeout(attemptTimeout);
2653
+ });
2654
+
2655
+ describe('#postBillingSubscribersSubscriberIdArloService - errors', () => {
2656
+ it('should have a postBillingSubscribersSubscriberIdArloService function', (done) => {
2657
+ try {
2658
+ assert.equal(true, typeof a.postBillingSubscribersSubscriberIdArloService === 'function');
2659
+ done();
2660
+ } catch (error) {
2661
+ log.error(`Test Failure: ${error}`);
2662
+ done(error);
2663
+ }
2664
+ }).timeout(attemptTimeout);
2665
+ it('should error if - missing subscriberId', (done) => {
2666
+ try {
2667
+ a.postBillingSubscribersSubscriberIdArloService(null, null, (data, error) => {
2668
+ try {
2669
+ const displayE = 'subscriberId is required';
2670
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-postBillingSubscribersSubscriberIdArloService', displayE);
2671
+ done();
2672
+ } catch (err) {
2673
+ log.error(`Test Failure: ${err}`);
2674
+ done(err);
2675
+ }
2676
+ });
2677
+ } catch (error) {
2678
+ log.error(`Adapter Exception: ${error}`);
2679
+ done(error);
2680
+ }
2681
+ }).timeout(attemptTimeout);
2682
+ it('should error if - missing body', (done) => {
2683
+ try {
2684
+ a.postBillingSubscribersSubscriberIdArloService('fakeparam', null, (data, error) => {
2685
+ try {
2686
+ const displayE = 'body is required';
2687
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-postBillingSubscribersSubscriberIdArloService', displayE);
2688
+ done();
2689
+ } catch (err) {
2690
+ log.error(`Test Failure: ${err}`);
2691
+ done(err);
2692
+ }
2693
+ });
2694
+ } catch (error) {
2695
+ log.error(`Adapter Exception: ${error}`);
2696
+ done(error);
2697
+ }
2698
+ }).timeout(attemptTimeout);
2699
+ });
2700
+
2701
+ describe('#deleteBillingSubscribersSubscriberIdArloService - errors', () => {
2702
+ it('should have a deleteBillingSubscribersSubscriberIdArloService function', (done) => {
2703
+ try {
2704
+ assert.equal(true, typeof a.deleteBillingSubscribersSubscriberIdArloService === 'function');
2705
+ done();
2706
+ } catch (error) {
2707
+ log.error(`Test Failure: ${error}`);
2708
+ done(error);
2709
+ }
2710
+ }).timeout(attemptTimeout);
2711
+ it('should error if - missing subscriberId', (done) => {
2712
+ try {
2713
+ a.deleteBillingSubscribersSubscriberIdArloService(null, (data, error) => {
2714
+ try {
2715
+ const displayE = 'subscriberId is required';
2716
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-deleteBillingSubscribersSubscriberIdArloService', displayE);
2717
+ done();
2718
+ } catch (err) {
2719
+ log.error(`Test Failure: ${err}`);
2720
+ done(err);
2721
+ }
2722
+ });
2723
+ } catch (error) {
2724
+ log.error(`Adapter Exception: ${error}`);
2725
+ done(error);
2726
+ }
2727
+ }).timeout(attemptTimeout);
2728
+ });
2729
+
2730
+ describe('#getBillingSubscribersSubscriberIdServifyContract - errors', () => {
2731
+ it('should have a getBillingSubscribersSubscriberIdServifyContract function', (done) => {
2732
+ try {
2733
+ assert.equal(true, typeof a.getBillingSubscribersSubscriberIdServifyContract === 'function');
2734
+ done();
2735
+ } catch (error) {
2736
+ log.error(`Test Failure: ${error}`);
2737
+ done(error);
2738
+ }
2739
+ }).timeout(attemptTimeout);
2740
+ it('should error if - missing subscriberId', (done) => {
2741
+ try {
2742
+ a.getBillingSubscribersSubscriberIdServifyContract(null, (data, error) => {
2743
+ try {
2744
+ const displayE = 'subscriberId is required';
2745
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-getBillingSubscribersSubscriberIdServifyContract', displayE);
2746
+ done();
2747
+ } catch (err) {
2748
+ log.error(`Test Failure: ${err}`);
2749
+ done(err);
2750
+ }
2751
+ });
2752
+ } catch (error) {
2753
+ log.error(`Adapter Exception: ${error}`);
2754
+ done(error);
2755
+ }
2756
+ }).timeout(attemptTimeout);
2757
+ });
2758
+
2759
+ describe('#postBillingSubscribersSubscriberIdServifyContract - errors', () => {
2760
+ it('should have a postBillingSubscribersSubscriberIdServifyContract function', (done) => {
2761
+ try {
2762
+ assert.equal(true, typeof a.postBillingSubscribersSubscriberIdServifyContract === 'function');
2763
+ done();
2764
+ } catch (error) {
2765
+ log.error(`Test Failure: ${error}`);
2766
+ done(error);
2767
+ }
2768
+ }).timeout(attemptTimeout);
2769
+ it('should error if - missing subscriberId', (done) => {
2770
+ try {
2771
+ a.postBillingSubscribersSubscriberIdServifyContract(null, null, (data, error) => {
2772
+ try {
2773
+ const displayE = 'subscriberId is required';
2774
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-postBillingSubscribersSubscriberIdServifyContract', displayE);
2775
+ done();
2776
+ } catch (err) {
2777
+ log.error(`Test Failure: ${err}`);
2778
+ done(err);
2779
+ }
2780
+ });
2781
+ } catch (error) {
2782
+ log.error(`Adapter Exception: ${error}`);
2783
+ done(error);
2784
+ }
2785
+ }).timeout(attemptTimeout);
2786
+ it('should error if - missing body', (done) => {
2787
+ try {
2788
+ a.postBillingSubscribersSubscriberIdServifyContract('fakeparam', null, (data, error) => {
2789
+ try {
2790
+ const displayE = 'body is required';
2791
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-postBillingSubscribersSubscriberIdServifyContract', displayE);
2792
+ done();
2793
+ } catch (err) {
2794
+ log.error(`Test Failure: ${err}`);
2795
+ done(err);
2796
+ }
2797
+ });
2798
+ } catch (error) {
2799
+ log.error(`Adapter Exception: ${error}`);
2800
+ done(error);
2801
+ }
2802
+ }).timeout(attemptTimeout);
2803
+ });
2804
+
2805
+ describe('#deleteBillingSubscribersSubscriberIdServifyContract - errors', () => {
2806
+ it('should have a deleteBillingSubscribersSubscriberIdServifyContract function', (done) => {
2807
+ try {
2808
+ assert.equal(true, typeof a.deleteBillingSubscribersSubscriberIdServifyContract === 'function');
2809
+ done();
2810
+ } catch (error) {
2811
+ log.error(`Test Failure: ${error}`);
2812
+ done(error);
2813
+ }
2814
+ }).timeout(attemptTimeout);
2815
+ it('should error if - missing subscriberId', (done) => {
2816
+ try {
2817
+ a.deleteBillingSubscribersSubscriberIdServifyContract(null, null, (data, error) => {
2818
+ try {
2819
+ const displayE = 'subscriberId is required';
2820
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-deleteBillingSubscribersSubscriberIdServifyContract', displayE);
2821
+ done();
2822
+ } catch (err) {
2823
+ log.error(`Test Failure: ${err}`);
2824
+ done(err);
2825
+ }
2826
+ });
2827
+ } catch (error) {
2828
+ log.error(`Adapter Exception: ${error}`);
2829
+ done(error);
2830
+ }
2831
+ }).timeout(attemptTimeout);
2832
+ it('should error if - missing reasonCode', (done) => {
2833
+ try {
2834
+ a.deleteBillingSubscribersSubscriberIdServifyContract('fakeparam', null, (data, error) => {
2835
+ try {
2836
+ const displayE = 'reasonCode is required';
2837
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-deleteBillingSubscribersSubscriberIdServifyContract', displayE);
2838
+ done();
2839
+ } catch (err) {
2840
+ log.error(`Test Failure: ${err}`);
2841
+ done(err);
2842
+ }
2843
+ });
2844
+ } catch (error) {
2845
+ log.error(`Adapter Exception: ${error}`);
2846
+ done(error);
2847
+ }
2848
+ }).timeout(attemptTimeout);
2849
+ });
2850
+
2851
+ describe('#getBillingSubscribersSubscriberIdManagedServiceArlo - errors', () => {
2852
+ it('should have a getBillingSubscribersSubscriberIdManagedServiceArlo function', (done) => {
2853
+ try {
2854
+ assert.equal(true, typeof a.getBillingSubscribersSubscriberIdManagedServiceArlo === 'function');
2855
+ done();
2856
+ } catch (error) {
2857
+ log.error(`Test Failure: ${error}`);
2858
+ done(error);
2859
+ }
2860
+ }).timeout(attemptTimeout);
2861
+ it('should error if - missing subscriberId', (done) => {
2862
+ try {
2863
+ a.getBillingSubscribersSubscriberIdManagedServiceArlo(null, (data, error) => {
2864
+ try {
2865
+ const displayE = 'subscriberId is required';
2866
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-getBillingSubscribersSubscriberIdManagedServiceArlo', displayE);
2867
+ done();
2868
+ } catch (err) {
2869
+ log.error(`Test Failure: ${err}`);
2870
+ done(err);
2871
+ }
2872
+ });
2873
+ } catch (error) {
2874
+ log.error(`Adapter Exception: ${error}`);
2875
+ done(error);
2876
+ }
2877
+ }).timeout(attemptTimeout);
2878
+ });
2879
+
2880
+ describe('#putBillingSubscribersSubscriberIdManagedServiceArlo - errors', () => {
2881
+ it('should have a putBillingSubscribersSubscriberIdManagedServiceArlo function', (done) => {
2882
+ try {
2883
+ assert.equal(true, typeof a.putBillingSubscribersSubscriberIdManagedServiceArlo === 'function');
2884
+ done();
2885
+ } catch (error) {
2886
+ log.error(`Test Failure: ${error}`);
2887
+ done(error);
2888
+ }
2889
+ }).timeout(attemptTimeout);
2890
+ it('should error if - missing subscriberId', (done) => {
2891
+ try {
2892
+ a.putBillingSubscribersSubscriberIdManagedServiceArlo(null, null, (data, error) => {
2893
+ try {
2894
+ const displayE = 'subscriberId is required';
2895
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-putBillingSubscribersSubscriberIdManagedServiceArlo', displayE);
2896
+ done();
2897
+ } catch (err) {
2898
+ log.error(`Test Failure: ${err}`);
2899
+ done(err);
2900
+ }
2901
+ });
2902
+ } catch (error) {
2903
+ log.error(`Adapter Exception: ${error}`);
2904
+ done(error);
2905
+ }
2906
+ }).timeout(attemptTimeout);
2907
+ it('should error if - missing body', (done) => {
2908
+ try {
2909
+ a.putBillingSubscribersSubscriberIdManagedServiceArlo('fakeparam', null, (data, error) => {
2910
+ try {
2911
+ const displayE = 'body is required';
2912
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-putBillingSubscribersSubscriberIdManagedServiceArlo', displayE);
2913
+ done();
2914
+ } catch (err) {
2915
+ log.error(`Test Failure: ${err}`);
2916
+ done(err);
2917
+ }
2918
+ });
2919
+ } catch (error) {
2920
+ log.error(`Adapter Exception: ${error}`);
2921
+ done(error);
2922
+ }
2923
+ }).timeout(attemptTimeout);
2924
+ });
2925
+
2926
+ describe('#postBillingSubscribersSubscriberIdManagedServiceArlo - errors', () => {
2927
+ it('should have a postBillingSubscribersSubscriberIdManagedServiceArlo function', (done) => {
2928
+ try {
2929
+ assert.equal(true, typeof a.postBillingSubscribersSubscriberIdManagedServiceArlo === 'function');
2930
+ done();
2931
+ } catch (error) {
2932
+ log.error(`Test Failure: ${error}`);
2933
+ done(error);
2934
+ }
2935
+ }).timeout(attemptTimeout);
2936
+ it('should error if - missing subscriberId', (done) => {
2937
+ try {
2938
+ a.postBillingSubscribersSubscriberIdManagedServiceArlo(null, null, (data, error) => {
2939
+ try {
2940
+ const displayE = 'subscriberId is required';
2941
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-postBillingSubscribersSubscriberIdManagedServiceArlo', displayE);
2942
+ done();
2943
+ } catch (err) {
2944
+ log.error(`Test Failure: ${err}`);
2945
+ done(err);
2946
+ }
2947
+ });
2948
+ } catch (error) {
2949
+ log.error(`Adapter Exception: ${error}`);
2950
+ done(error);
2951
+ }
2952
+ }).timeout(attemptTimeout);
2953
+ it('should error if - missing body', (done) => {
2954
+ try {
2955
+ a.postBillingSubscribersSubscriberIdManagedServiceArlo('fakeparam', null, (data, error) => {
2956
+ try {
2957
+ const displayE = 'body is required';
2958
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-postBillingSubscribersSubscriberIdManagedServiceArlo', displayE);
2959
+ done();
2960
+ } catch (err) {
2961
+ log.error(`Test Failure: ${err}`);
2962
+ done(err);
2963
+ }
2964
+ });
2965
+ } catch (error) {
2966
+ log.error(`Adapter Exception: ${error}`);
2967
+ done(error);
2968
+ }
2969
+ }).timeout(attemptTimeout);
2970
+ });
2971
+
2972
+ describe('#deleteBillingSubscribersSubscriberIdManagedServiceArlo - errors', () => {
2973
+ it('should have a deleteBillingSubscribersSubscriberIdManagedServiceArlo function', (done) => {
2974
+ try {
2975
+ assert.equal(true, typeof a.deleteBillingSubscribersSubscriberIdManagedServiceArlo === 'function');
2976
+ done();
2977
+ } catch (error) {
2978
+ log.error(`Test Failure: ${error}`);
2979
+ done(error);
2980
+ }
2981
+ }).timeout(attemptTimeout);
2982
+ it('should error if - missing subscriberId', (done) => {
2983
+ try {
2984
+ a.deleteBillingSubscribersSubscriberIdManagedServiceArlo(null, (data, error) => {
2985
+ try {
2986
+ const displayE = 'subscriberId is required';
2987
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-deleteBillingSubscribersSubscriberIdManagedServiceArlo', displayE);
2988
+ done();
2989
+ } catch (err) {
2990
+ log.error(`Test Failure: ${err}`);
2991
+ done(err);
2992
+ }
2993
+ });
2994
+ } catch (error) {
2995
+ log.error(`Adapter Exception: ${error}`);
2996
+ done(error);
2997
+ }
2998
+ }).timeout(attemptTimeout);
2999
+ });
3000
+
3001
+ describe('#getBillingSubscribersSubscriberIdManagedServiceServify - errors', () => {
3002
+ it('should have a getBillingSubscribersSubscriberIdManagedServiceServify function', (done) => {
3003
+ try {
3004
+ assert.equal(true, typeof a.getBillingSubscribersSubscriberIdManagedServiceServify === 'function');
3005
+ done();
3006
+ } catch (error) {
3007
+ log.error(`Test Failure: ${error}`);
3008
+ done(error);
3009
+ }
3010
+ }).timeout(attemptTimeout);
3011
+ it('should error if - missing subscriberId', (done) => {
3012
+ try {
3013
+ a.getBillingSubscribersSubscriberIdManagedServiceServify(null, (data, error) => {
3014
+ try {
3015
+ const displayE = 'subscriberId is required';
3016
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-getBillingSubscribersSubscriberIdManagedServiceServify', displayE);
3017
+ done();
3018
+ } catch (err) {
3019
+ log.error(`Test Failure: ${err}`);
3020
+ done(err);
3021
+ }
3022
+ });
3023
+ } catch (error) {
3024
+ log.error(`Adapter Exception: ${error}`);
3025
+ done(error);
3026
+ }
3027
+ }).timeout(attemptTimeout);
3028
+ });
3029
+
3030
+ describe('#putBillingSubscribersSubscriberIdManagedServiceServify - errors', () => {
3031
+ it('should have a putBillingSubscribersSubscriberIdManagedServiceServify function', (done) => {
3032
+ try {
3033
+ assert.equal(true, typeof a.putBillingSubscribersSubscriberIdManagedServiceServify === 'function');
3034
+ done();
3035
+ } catch (error) {
3036
+ log.error(`Test Failure: ${error}`);
3037
+ done(error);
3038
+ }
3039
+ }).timeout(attemptTimeout);
3040
+ it('should error if - missing subscriberId', (done) => {
3041
+ try {
3042
+ a.putBillingSubscribersSubscriberIdManagedServiceServify(null, null, (data, error) => {
3043
+ try {
3044
+ const displayE = 'subscriberId is required';
3045
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-putBillingSubscribersSubscriberIdManagedServiceServify', displayE);
3046
+ done();
3047
+ } catch (err) {
3048
+ log.error(`Test Failure: ${err}`);
3049
+ done(err);
3050
+ }
3051
+ });
3052
+ } catch (error) {
3053
+ log.error(`Adapter Exception: ${error}`);
3054
+ done(error);
3055
+ }
3056
+ }).timeout(attemptTimeout);
3057
+ it('should error if - missing planCode', (done) => {
3058
+ try {
3059
+ a.putBillingSubscribersSubscriberIdManagedServiceServify('fakeparam', null, (data, error) => {
3060
+ try {
3061
+ const displayE = 'planCode is required';
3062
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-putBillingSubscribersSubscriberIdManagedServiceServify', displayE);
3063
+ done();
3064
+ } catch (err) {
3065
+ log.error(`Test Failure: ${err}`);
3066
+ done(err);
3067
+ }
3068
+ });
3069
+ } catch (error) {
3070
+ log.error(`Adapter Exception: ${error}`);
3071
+ done(error);
3072
+ }
3073
+ }).timeout(attemptTimeout);
3074
+ });
3075
+
3076
+ describe('#postBillingSubscribersSubscriberIdManagedServiceServify - errors', () => {
3077
+ it('should have a postBillingSubscribersSubscriberIdManagedServiceServify function', (done) => {
3078
+ try {
3079
+ assert.equal(true, typeof a.postBillingSubscribersSubscriberIdManagedServiceServify === 'function');
3080
+ done();
3081
+ } catch (error) {
3082
+ log.error(`Test Failure: ${error}`);
3083
+ done(error);
3084
+ }
3085
+ }).timeout(attemptTimeout);
3086
+ it('should error if - missing subscriberId', (done) => {
3087
+ try {
3088
+ a.postBillingSubscribersSubscriberIdManagedServiceServify(null, null, (data, error) => {
3089
+ try {
3090
+ const displayE = 'subscriberId is required';
3091
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-postBillingSubscribersSubscriberIdManagedServiceServify', displayE);
3092
+ done();
3093
+ } catch (err) {
3094
+ log.error(`Test Failure: ${err}`);
3095
+ done(err);
3096
+ }
3097
+ });
3098
+ } catch (error) {
3099
+ log.error(`Adapter Exception: ${error}`);
3100
+ done(error);
3101
+ }
3102
+ }).timeout(attemptTimeout);
3103
+ it('should error if - missing body', (done) => {
3104
+ try {
3105
+ a.postBillingSubscribersSubscriberIdManagedServiceServify('fakeparam', null, (data, error) => {
3106
+ try {
3107
+ const displayE = 'body is required';
3108
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-postBillingSubscribersSubscriberIdManagedServiceServify', displayE);
3109
+ done();
3110
+ } catch (err) {
3111
+ log.error(`Test Failure: ${err}`);
3112
+ done(err);
3113
+ }
3114
+ });
3115
+ } catch (error) {
3116
+ log.error(`Adapter Exception: ${error}`);
3117
+ done(error);
3118
+ }
3119
+ }).timeout(attemptTimeout);
3120
+ });
3121
+
3122
+ describe('#deleteBillingSubscribersSubscriberIdManagedServiceServify - errors', () => {
3123
+ it('should have a deleteBillingSubscribersSubscriberIdManagedServiceServify function', (done) => {
3124
+ try {
3125
+ assert.equal(true, typeof a.deleteBillingSubscribersSubscriberIdManagedServiceServify === 'function');
3126
+ done();
3127
+ } catch (error) {
3128
+ log.error(`Test Failure: ${error}`);
3129
+ done(error);
3130
+ }
3131
+ }).timeout(attemptTimeout);
3132
+ it('should error if - missing subscriberId', (done) => {
3133
+ try {
3134
+ a.deleteBillingSubscribersSubscriberIdManagedServiceServify(null, null, (data, error) => {
3135
+ try {
3136
+ const displayE = 'subscriberId is required';
3137
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-deleteBillingSubscribersSubscriberIdManagedServiceServify', displayE);
3138
+ done();
3139
+ } catch (err) {
3140
+ log.error(`Test Failure: ${err}`);
3141
+ done(err);
3142
+ }
3143
+ });
3144
+ } catch (error) {
3145
+ log.error(`Adapter Exception: ${error}`);
3146
+ done(error);
3147
+ }
3148
+ }).timeout(attemptTimeout);
3149
+ it('should error if - missing reasonCode', (done) => {
3150
+ try {
3151
+ a.deleteBillingSubscribersSubscriberIdManagedServiceServify('fakeparam', null, (data, error) => {
3152
+ try {
3153
+ const displayE = 'reasonCode is required';
3154
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-deleteBillingSubscribersSubscriberIdManagedServiceServify', displayE);
3155
+ done();
3156
+ } catch (err) {
3157
+ log.error(`Test Failure: ${err}`);
3158
+ done(err);
3159
+ }
3160
+ });
3161
+ } catch (error) {
3162
+ log.error(`Adapter Exception: ${error}`);
3163
+ done(error);
3164
+ }
3165
+ }).timeout(attemptTimeout);
3166
+ });
3167
+
3168
+ describe('#getBillingSubscribersSubscriberIdSmarttownWifiSubscriber - errors', () => {
3169
+ it('should have a getBillingSubscribersSubscriberIdSmarttownWifiSubscriber function', (done) => {
3170
+ try {
3171
+ assert.equal(true, typeof a.getBillingSubscribersSubscriberIdSmarttownWifiSubscriber === 'function');
3172
+ done();
3173
+ } catch (error) {
3174
+ log.error(`Test Failure: ${error}`);
3175
+ done(error);
3176
+ }
3177
+ }).timeout(attemptTimeout);
3178
+ it('should error if - missing subscriberId', (done) => {
3179
+ try {
3180
+ a.getBillingSubscribersSubscriberIdSmarttownWifiSubscriber(null, (data, error) => {
3181
+ try {
3182
+ const displayE = 'subscriberId is required';
3183
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-getBillingSubscribersSubscriberIdSmarttownWifiSubscriber', displayE);
3184
+ done();
3185
+ } catch (err) {
3186
+ log.error(`Test Failure: ${err}`);
3187
+ done(err);
3188
+ }
3189
+ });
3190
+ } catch (error) {
3191
+ log.error(`Adapter Exception: ${error}`);
3192
+ done(error);
3193
+ }
3194
+ }).timeout(attemptTimeout);
3195
+ });
3196
+
3197
+ describe('#putBillingSubscribersSubscriberIdSmarttownWifiSubscriber - errors', () => {
3198
+ it('should have a putBillingSubscribersSubscriberIdSmarttownWifiSubscriber function', (done) => {
3199
+ try {
3200
+ assert.equal(true, typeof a.putBillingSubscribersSubscriberIdSmarttownWifiSubscriber === 'function');
3201
+ done();
3202
+ } catch (error) {
3203
+ log.error(`Test Failure: ${error}`);
3204
+ done(error);
3205
+ }
3206
+ }).timeout(attemptTimeout);
3207
+ it('should error if - missing subscriberId', (done) => {
3208
+ try {
3209
+ a.putBillingSubscribersSubscriberIdSmarttownWifiSubscriber(null, null, (data, error) => {
3210
+ try {
3211
+ const displayE = 'subscriberId is required';
3212
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-putBillingSubscribersSubscriberIdSmarttownWifiSubscriber', displayE);
3213
+ done();
3214
+ } catch (err) {
3215
+ log.error(`Test Failure: ${err}`);
3216
+ done(err);
3217
+ }
3218
+ });
3219
+ } catch (error) {
3220
+ log.error(`Adapter Exception: ${error}`);
3221
+ done(error);
3222
+ }
3223
+ }).timeout(attemptTimeout);
3224
+ it('should error if - missing body', (done) => {
3225
+ try {
3226
+ a.putBillingSubscribersSubscriberIdSmarttownWifiSubscriber('fakeparam', null, (data, error) => {
3227
+ try {
3228
+ const displayE = 'body is required';
3229
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-putBillingSubscribersSubscriberIdSmarttownWifiSubscriber', displayE);
3230
+ done();
3231
+ } catch (err) {
3232
+ log.error(`Test Failure: ${err}`);
3233
+ done(err);
3234
+ }
3235
+ });
3236
+ } catch (error) {
3237
+ log.error(`Adapter Exception: ${error}`);
3238
+ done(error);
3239
+ }
3240
+ }).timeout(attemptTimeout);
3241
+ });
3242
+
3243
+ describe('#getBillingServiceDefinitions - errors', () => {
3244
+ it('should have a getBillingServiceDefinitions function', (done) => {
3245
+ try {
3246
+ assert.equal(true, typeof a.getBillingServiceDefinitions === 'function');
3247
+ done();
3248
+ } catch (error) {
3249
+ log.error(`Test Failure: ${error}`);
3250
+ done(error);
3251
+ }
3252
+ }).timeout(attemptTimeout);
3253
+ });
3254
+
3255
+ describe('#putBillingServiceDefinitions - errors', () => {
3256
+ it('should have a putBillingServiceDefinitions function', (done) => {
3257
+ try {
3258
+ assert.equal(true, typeof a.putBillingServiceDefinitions === 'function');
3259
+ done();
3260
+ } catch (error) {
3261
+ log.error(`Test Failure: ${error}`);
3262
+ done(error);
3263
+ }
3264
+ }).timeout(attemptTimeout);
3265
+ it('should error if - missing body', (done) => {
3266
+ try {
3267
+ a.putBillingServiceDefinitions(null, (data, error) => {
3268
+ try {
3269
+ const displayE = 'body is required';
3270
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-putBillingServiceDefinitions', displayE);
3271
+ done();
3272
+ } catch (err) {
3273
+ log.error(`Test Failure: ${err}`);
3274
+ done(err);
3275
+ }
3276
+ });
3277
+ } catch (error) {
3278
+ log.error(`Adapter Exception: ${error}`);
3279
+ done(error);
3280
+ }
3281
+ }).timeout(attemptTimeout);
3282
+ });
3283
+
3284
+ describe('#postBillingServiceDefinitions - errors', () => {
3285
+ it('should have a postBillingServiceDefinitions function', (done) => {
3286
+ try {
3287
+ assert.equal(true, typeof a.postBillingServiceDefinitions === 'function');
3288
+ done();
3289
+ } catch (error) {
3290
+ log.error(`Test Failure: ${error}`);
3291
+ done(error);
3292
+ }
3293
+ }).timeout(attemptTimeout);
3294
+ it('should error if - missing body', (done) => {
3295
+ try {
3296
+ a.postBillingServiceDefinitions(null, (data, error) => {
3297
+ try {
3298
+ const displayE = 'body is required';
3299
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-postBillingServiceDefinitions', displayE);
3300
+ done();
3301
+ } catch (err) {
3302
+ log.error(`Test Failure: ${err}`);
3303
+ done(err);
3304
+ }
3305
+ });
3306
+ } catch (error) {
3307
+ log.error(`Adapter Exception: ${error}`);
3308
+ done(error);
3309
+ }
3310
+ }).timeout(attemptTimeout);
3311
+ });
3312
+
3313
+ describe('#getBillingServiceDefinitionsServiceDefinitionId - errors', () => {
3314
+ it('should have a getBillingServiceDefinitionsServiceDefinitionId function', (done) => {
3315
+ try {
3316
+ assert.equal(true, typeof a.getBillingServiceDefinitionsServiceDefinitionId === 'function');
3317
+ done();
3318
+ } catch (error) {
3319
+ log.error(`Test Failure: ${error}`);
3320
+ done(error);
3321
+ }
3322
+ }).timeout(attemptTimeout);
3323
+ it('should error if - missing serviceDefinitionId', (done) => {
3324
+ try {
3325
+ a.getBillingServiceDefinitionsServiceDefinitionId(null, (data, error) => {
3326
+ try {
3327
+ const displayE = 'serviceDefinitionId is required';
3328
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-getBillingServiceDefinitionsServiceDefinitionId', displayE);
3329
+ done();
3330
+ } catch (err) {
3331
+ log.error(`Test Failure: ${err}`);
3332
+ done(err);
3333
+ }
3334
+ });
3335
+ } catch (error) {
3336
+ log.error(`Adapter Exception: ${error}`);
3337
+ done(error);
3338
+ }
3339
+ }).timeout(attemptTimeout);
3340
+ });
3341
+
3342
+ describe('#putBillingServiceDefinitionsServiceDefinitionId - errors', () => {
3343
+ it('should have a putBillingServiceDefinitionsServiceDefinitionId function', (done) => {
3344
+ try {
3345
+ assert.equal(true, typeof a.putBillingServiceDefinitionsServiceDefinitionId === 'function');
3346
+ done();
3347
+ } catch (error) {
3348
+ log.error(`Test Failure: ${error}`);
3349
+ done(error);
3350
+ }
3351
+ }).timeout(attemptTimeout);
3352
+ it('should error if - missing serviceDefinitionId', (done) => {
3353
+ try {
3354
+ a.putBillingServiceDefinitionsServiceDefinitionId(null, null, (data, error) => {
3355
+ try {
3356
+ const displayE = 'serviceDefinitionId is required';
3357
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-putBillingServiceDefinitionsServiceDefinitionId', displayE);
3358
+ done();
3359
+ } catch (err) {
3360
+ log.error(`Test Failure: ${err}`);
3361
+ done(err);
3362
+ }
3363
+ });
3364
+ } catch (error) {
3365
+ log.error(`Adapter Exception: ${error}`);
3366
+ done(error);
3367
+ }
3368
+ }).timeout(attemptTimeout);
3369
+ it('should error if - missing body', (done) => {
3370
+ try {
3371
+ a.putBillingServiceDefinitionsServiceDefinitionId('fakeparam', null, (data, error) => {
3372
+ try {
3373
+ const displayE = 'body is required';
3374
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-putBillingServiceDefinitionsServiceDefinitionId', displayE);
3375
+ done();
3376
+ } catch (err) {
3377
+ log.error(`Test Failure: ${err}`);
3378
+ done(err);
3379
+ }
3380
+ });
3381
+ } catch (error) {
3382
+ log.error(`Adapter Exception: ${error}`);
3383
+ done(error);
3384
+ }
3385
+ }).timeout(attemptTimeout);
3386
+ });
3387
+
3388
+ describe('#deleteBillingServiceDefinitionsServiceDefinitionId - errors', () => {
3389
+ it('should have a deleteBillingServiceDefinitionsServiceDefinitionId function', (done) => {
3390
+ try {
3391
+ assert.equal(true, typeof a.deleteBillingServiceDefinitionsServiceDefinitionId === 'function');
3392
+ done();
3393
+ } catch (error) {
3394
+ log.error(`Test Failure: ${error}`);
3395
+ done(error);
3396
+ }
3397
+ }).timeout(attemptTimeout);
3398
+ it('should error if - missing serviceDefinitionId', (done) => {
3399
+ try {
3400
+ a.deleteBillingServiceDefinitionsServiceDefinitionId(null, (data, error) => {
3401
+ try {
3402
+ const displayE = 'serviceDefinitionId is required';
3403
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-deleteBillingServiceDefinitionsServiceDefinitionId', displayE);
3404
+ done();
3405
+ } catch (err) {
3406
+ log.error(`Test Failure: ${err}`);
3407
+ done(err);
3408
+ }
3409
+ });
3410
+ } catch (error) {
3411
+ log.error(`Adapter Exception: ${error}`);
3412
+ done(error);
3413
+ }
3414
+ }).timeout(attemptTimeout);
3415
+ });
3416
+
3417
+ describe('#getBillingSupportOperatorSsid - errors', () => {
3418
+ it('should have a getBillingSupportOperatorSsid function', (done) => {
3419
+ try {
3420
+ assert.equal(true, typeof a.getBillingSupportOperatorSsid === 'function');
3421
+ done();
3422
+ } catch (error) {
3423
+ log.error(`Test Failure: ${error}`);
3424
+ done(error);
3425
+ }
3426
+ }).timeout(attemptTimeout);
3427
+ });
3428
+
3429
+ describe('#putBillingSupportOperatorSsid - errors', () => {
3430
+ it('should have a putBillingSupportOperatorSsid function', (done) => {
3431
+ try {
3432
+ assert.equal(true, typeof a.putBillingSupportOperatorSsid === 'function');
3433
+ done();
3434
+ } catch (error) {
3435
+ log.error(`Test Failure: ${error}`);
3436
+ done(error);
3437
+ }
3438
+ }).timeout(attemptTimeout);
3439
+ });
3440
+
3441
+ describe('#getBillingSupportOperatorSecondarynetworkAvailability - errors', () => {
3442
+ it('should have a getBillingSupportOperatorSecondarynetworkAvailability function', (done) => {
3443
+ try {
3444
+ assert.equal(true, typeof a.getBillingSupportOperatorSecondarynetworkAvailability === 'function');
3445
+ done();
3446
+ } catch (error) {
3447
+ log.error(`Test Failure: ${error}`);
3448
+ done(error);
3449
+ }
3450
+ }).timeout(attemptTimeout);
3451
+ });
3452
+
3453
+ describe('#getBillingSupportOperatorSecondarynetwork - errors', () => {
3454
+ it('should have a getBillingSupportOperatorSecondarynetwork function', (done) => {
3455
+ try {
3456
+ assert.equal(true, typeof a.getBillingSupportOperatorSecondarynetwork === 'function');
3457
+ done();
3458
+ } catch (error) {
3459
+ log.error(`Test Failure: ${error}`);
3460
+ done(error);
3461
+ }
3462
+ }).timeout(attemptTimeout);
3463
+ });
3464
+
3465
+ describe('#putBillingSupportOperatorSecondarynetwork - errors', () => {
3466
+ it('should have a putBillingSupportOperatorSecondarynetwork function', (done) => {
3467
+ try {
3468
+ assert.equal(true, typeof a.putBillingSupportOperatorSecondarynetwork === 'function');
3469
+ done();
3470
+ } catch (error) {
3471
+ log.error(`Test Failure: ${error}`);
3472
+ done(error);
3473
+ }
3474
+ }).timeout(attemptTimeout);
3475
+ });
3476
+
3477
+ describe('#postBillingSupportOperatorSecondarynetwork - errors', () => {
3478
+ it('should have a postBillingSupportOperatorSecondarynetwork function', (done) => {
3479
+ try {
3480
+ assert.equal(true, typeof a.postBillingSupportOperatorSecondarynetwork === 'function');
3481
+ done();
3482
+ } catch (error) {
3483
+ log.error(`Test Failure: ${error}`);
3484
+ done(error);
3485
+ }
3486
+ }).timeout(attemptTimeout);
3487
+ });
3488
+
3489
+ describe('#deleteBillingSupportOperatorSecondarynetwork - errors', () => {
3490
+ it('should have a deleteBillingSupportOperatorSecondarynetwork function', (done) => {
3491
+ try {
3492
+ assert.equal(true, typeof a.deleteBillingSupportOperatorSecondarynetwork === 'function');
3493
+ done();
3494
+ } catch (error) {
3495
+ log.error(`Test Failure: ${error}`);
3496
+ done(error);
3497
+ }
3498
+ }).timeout(attemptTimeout);
3499
+ });
3500
+
3501
+ describe('#searchServiceDefinitions - errors', () => {
3502
+ it('should have a searchServiceDefinitions function', (done) => {
3503
+ try {
3504
+ assert.equal(true, typeof a.searchServiceDefinitions === 'function');
3505
+ done();
3506
+ } catch (error) {
3507
+ log.error(`Test Failure: ${error}`);
3508
+ done(error);
3509
+ }
3510
+ }).timeout(attemptTimeout);
3511
+ });
3512
+
3513
+ describe('#getTrafficUsage - errors', () => {
3514
+ it('should have a getTrafficUsage function', (done) => {
3515
+ try {
3516
+ assert.equal(true, typeof a.getTrafficUsage === 'function');
3517
+ done();
3518
+ } catch (error) {
3519
+ log.error(`Test Failure: ${error}`);
3520
+ done(error);
3521
+ }
3522
+ }).timeout(attemptTimeout);
3523
+ it('should error if - missing granularity', (done) => {
3524
+ try {
3525
+ a.getTrafficUsage(null, null, null, null, (data, error) => {
3526
+ try {
3527
+ const displayE = 'granularity is required';
3528
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-getTrafficUsage', displayE);
3529
+ done();
3530
+ } catch (err) {
3531
+ log.error(`Test Failure: ${err}`);
3532
+ done(err);
3533
+ }
3534
+ });
3535
+ } catch (error) {
3536
+ log.error(`Adapter Exception: ${error}`);
3537
+ done(error);
3538
+ }
3539
+ }).timeout(attemptTimeout);
3540
+ it('should error if - missing startTime', (done) => {
3541
+ try {
3542
+ a.getTrafficUsage('fakeparam', null, null, null, (data, error) => {
3543
+ try {
3544
+ const displayE = 'startTime is required';
3545
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-getTrafficUsage', displayE);
3546
+ done();
3547
+ } catch (err) {
3548
+ log.error(`Test Failure: ${err}`);
3549
+ done(err);
3550
+ }
3551
+ });
3552
+ } catch (error) {
3553
+ log.error(`Adapter Exception: ${error}`);
3554
+ done(error);
3555
+ }
3556
+ }).timeout(attemptTimeout);
3557
+ it('should error if - missing subscriber', (done) => {
3558
+ try {
3559
+ a.getTrafficUsage('fakeparam', 'fakeparam', 'fakeparam', null, (data, error) => {
3560
+ try {
3561
+ const displayE = 'subscriber is required';
3562
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-getTrafficUsage', displayE);
3563
+ done();
3564
+ } catch (err) {
3565
+ log.error(`Test Failure: ${err}`);
3566
+ done(err);
3567
+ }
3568
+ });
3569
+ } catch (error) {
3570
+ log.error(`Adapter Exception: ${error}`);
3571
+ done(error);
3572
+ }
3573
+ }).timeout(attemptTimeout);
3574
+ });
3575
+
3576
+ describe('#getTrafficUsageForAllSubs - errors', () => {
3577
+ it('should have a getTrafficUsageForAllSubs function', (done) => {
3578
+ try {
3579
+ assert.equal(true, typeof a.getTrafficUsageForAllSubs === 'function');
3580
+ done();
3581
+ } catch (error) {
3582
+ log.error(`Test Failure: ${error}`);
3583
+ done(error);
3584
+ }
3585
+ }).timeout(attemptTimeout);
3586
+ it('should error if - missing granularity', (done) => {
3587
+ try {
3588
+ a.getTrafficUsageForAllSubs(null, null, null, null, null, (data, error) => {
3589
+ try {
3590
+ const displayE = 'granularity is required';
3591
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-getTrafficUsageForAllSubs', displayE);
3592
+ done();
3593
+ } catch (err) {
3594
+ log.error(`Test Failure: ${err}`);
3595
+ done(err);
3596
+ }
3597
+ });
3598
+ } catch (error) {
3599
+ log.error(`Adapter Exception: ${error}`);
3600
+ done(error);
3601
+ }
3602
+ }).timeout(attemptTimeout);
3603
+ it('should error if - missing startTime', (done) => {
3604
+ try {
3605
+ a.getTrafficUsageForAllSubs('fakeparam', null, null, null, null, (data, error) => {
3606
+ try {
3607
+ const displayE = 'startTime is required';
3608
+ runErrorAsserts(data, error, 'AD.300', 'Test-calix_cloud_devportal-adapter-getTrafficUsageForAllSubs', displayE);
3609
+ done();
3610
+ } catch (err) {
3611
+ log.error(`Test Failure: ${err}`);
3612
+ done(err);
3613
+ }
3614
+ });
3615
+ } catch (error) {
3616
+ log.error(`Adapter Exception: ${error}`);
3617
+ done(error);
3618
+ }
3619
+ }).timeout(attemptTimeout);
3620
+ });
3621
+ });
3622
+ });