@itentialopensource/adapter-godaddy 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/.eslintignore +5 -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 +3 -0
  9. package/AUTH.md +34 -0
  10. package/BROKER.md +199 -0
  11. package/CALLS.md +748 -0
  12. package/CHANGELOG.md +9 -0
  13. package/CODE_OF_CONDUCT.md +43 -0
  14. package/CONTRIBUTING.md +13 -0
  15. package/ENHANCE.md +69 -0
  16. package/LICENSE +201 -0
  17. package/PROPERTIES.md +641 -0
  18. package/README.md +346 -0
  19. package/SUMMARY.md +9 -0
  20. package/SYSTEMINFO.md +13 -0
  21. package/TROUBLESHOOT.md +47 -0
  22. package/adapter.js +9144 -0
  23. package/adapterBase.js +1452 -0
  24. package/changelogs/CHANGELOG.md +0 -0
  25. package/entities/.generic/action.json +214 -0
  26. package/entities/.generic/schema.json +28 -0
  27. package/entities/.system/action.json +50 -0
  28. package/entities/.system/mockdatafiles/getToken-default.json +3 -0
  29. package/entities/.system/mockdatafiles/healthcheck-default.json +3 -0
  30. package/entities/.system/schema.json +19 -0
  31. package/entities/.system/schemaTokenReq.json +53 -0
  32. package/entities/.system/schemaTokenResp.json +53 -0
  33. package/entities/Abuse/action.json +66 -0
  34. package/entities/Abuse/schema.json +21 -0
  35. package/entities/Actions/action.json +66 -0
  36. package/entities/Actions/mockdatafiles/getV2CustomersCustomerIdDomainsDomainActions-default.json +126 -0
  37. package/entities/Actions/schema.json +21 -0
  38. package/entities/Aftermarket/action.json +44 -0
  39. package/entities/Aftermarket/schema.json +20 -0
  40. package/entities/Agreements/action.json +25 -0
  41. package/entities/Agreements/mockdatafiles/getAgreements-default.json +8 -0
  42. package/entities/Agreements/schema.json +19 -0
  43. package/entities/Certificate/action.json +517 -0
  44. package/entities/Certificate/mockdatafiles/certificateGetEntitlement-default.json +205 -0
  45. package/entities/Certificate/mockdatafiles/getDomainInformationByCertificateId-default.json +32 -0
  46. package/entities/Certificate/schema.json +43 -0
  47. package/entities/Countries/action.json +46 -0
  48. package/entities/Countries/schema.json +20 -0
  49. package/entities/Domains/action.json +696 -0
  50. package/entities/Domains/mockdatafiles/domainsForwardsGet-default.json +12 -0
  51. package/entities/Domains/mockdatafiles/getAgreement-default.json +8 -0
  52. package/entities/Domains/mockdatafiles/listDomains-default.json +198 -0
  53. package/entities/Domains/mockdatafiles/recordGet-default.json +24 -0
  54. package/entities/Domains/mockdatafiles/suggest-default.json +11 -0
  55. package/entities/Domains/mockdatafiles/tlds-default.json +14 -0
  56. package/entities/Domains/schema.json +52 -0
  57. package/entities/Notifications/action.json +107 -0
  58. package/entities/Notifications/mockdatafiles/getV2CustomersCustomerIdDomainsNotificationsOptIn-default.json +32 -0
  59. package/entities/Notifications/schema.json +23 -0
  60. package/entities/Orders/action.json +46 -0
  61. package/entities/Orders/schema.json +20 -0
  62. package/entities/Parking/action.json +46 -0
  63. package/entities/Parking/schema.json +20 -0
  64. package/entities/Shoppers/action.json +126 -0
  65. package/entities/Shoppers/schema.json +24 -0
  66. package/entities/Subscriptions/action.json +107 -0
  67. package/entities/Subscriptions/mockdatafiles/productGroups-default.json +10 -0
  68. package/entities/Subscriptions/schema.json +23 -0
  69. package/error.json +190 -0
  70. package/metadata.json +54 -0
  71. package/package.json +82 -0
  72. package/pronghorn.json +15805 -0
  73. package/propertiesDecorators.json +14 -0
  74. package/propertiesSchema.json +1661 -0
  75. package/refs?service=git-upload-pack +0 -0
  76. package/report/adapter-openapi.json +13714 -0
  77. package/report/adapter-openapi.yaml +20419 -0
  78. package/report/adapterInfo.json +10 -0
  79. package/report/creationReport.json +765 -0
  80. package/report/godaddy.json +13714 -0
  81. package/report/updateReport1706477552013.json +120 -0
  82. package/sampleProperties.json +254 -0
  83. package/test/integration/adapterTestBasicGet.js +83 -0
  84. package/test/integration/adapterTestConnectivity.js +142 -0
  85. package/test/integration/adapterTestIntegration.js +2925 -0
  86. package/test/unit/adapterBaseTestUnit.js +1024 -0
  87. package/test/unit/adapterTestUnit.js +4900 -0
  88. package/utils/adapterInfo.js +206 -0
  89. package/utils/addAuth.js +94 -0
  90. package/utils/artifactize.js +146 -0
  91. package/utils/basicGet.js +50 -0
  92. package/utils/checkMigrate.js +63 -0
  93. package/utils/entitiesToDB.js +179 -0
  94. package/utils/findPath.js +74 -0
  95. package/utils/methodDocumentor.js +273 -0
  96. package/utils/modify.js +152 -0
  97. package/utils/packModificationScript.js +35 -0
  98. package/utils/patches2bundledDeps.js +90 -0
  99. package/utils/pre-commit.sh +32 -0
  100. package/utils/removeHooks.js +20 -0
  101. package/utils/setup.js +33 -0
  102. package/utils/taskMover.js +309 -0
  103. package/utils/tbScript.js +239 -0
  104. package/utils/tbUtils.js +489 -0
  105. package/utils/testRunner.js +298 -0
  106. package/utils/troubleshootingAdapter.js +193 -0
@@ -0,0 +1,4900 @@
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 path = require('path');
12
+ const util = require('util');
13
+ const execute = require('child_process').execSync;
14
+ const fs = require('fs-extra');
15
+ const mocha = require('mocha');
16
+ const winston = require('winston');
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({ strictSchema: false, allErrors: true, allowUnionTypes: true });
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-godaddy',
59
+ type: 'Godaddy',
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 Godaddy = 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] Godaddy Adapter Test', () => {
136
+ describe('Godaddy Class Tests', () => {
137
+ const a = new Godaddy(
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
+ // Define the JSON schema for package.json
226
+ const packageJsonSchema = {
227
+ type: 'object',
228
+ properties: {
229
+ name: { type: 'string' },
230
+ version: { type: 'string' }
231
+ // May need to add more properties as needed
232
+ },
233
+ required: ['name', 'version']
234
+ };
235
+ const validate = ajv.compile(packageJsonSchema);
236
+ const isValid = validate(packageDotJson);
237
+
238
+ if (isValid === false) {
239
+ log.error('The package.json contains errors');
240
+ assert.equal(true, isValid);
241
+ } else {
242
+ assert.equal(true, isValid);
243
+ }
244
+
245
+ done();
246
+ } catch (error) {
247
+ log.error(`Test Failure: ${error}`);
248
+ done(error);
249
+ }
250
+ });
251
+ it('package.json standard fields should be customized', (done) => {
252
+ try {
253
+ const packageDotJson = require('../../package.json');
254
+ assert.notEqual(-1, packageDotJson.name.indexOf('godaddy'));
255
+ assert.notEqual(undefined, packageDotJson.version);
256
+ assert.notEqual(null, packageDotJson.version);
257
+ assert.notEqual('', packageDotJson.version);
258
+ assert.notEqual(undefined, packageDotJson.description);
259
+ assert.notEqual(null, packageDotJson.description);
260
+ assert.notEqual('', packageDotJson.description);
261
+ assert.equal('adapter.js', packageDotJson.main);
262
+ assert.notEqual(undefined, packageDotJson.wizardVersion);
263
+ assert.notEqual(null, packageDotJson.wizardVersion);
264
+ assert.notEqual('', packageDotJson.wizardVersion);
265
+ assert.notEqual(undefined, packageDotJson.engineVersion);
266
+ assert.notEqual(null, packageDotJson.engineVersion);
267
+ assert.notEqual('', packageDotJson.engineVersion);
268
+ assert.equal('http', packageDotJson.adapterType);
269
+ done();
270
+ } catch (error) {
271
+ log.error(`Test Failure: ${error}`);
272
+ done(error);
273
+ }
274
+ });
275
+ it('package.json proper scripts should be provided', (done) => {
276
+ try {
277
+ const packageDotJson = require('../../package.json');
278
+ assert.notEqual(undefined, packageDotJson.scripts);
279
+ assert.notEqual(null, packageDotJson.scripts);
280
+ assert.notEqual('', packageDotJson.scripts);
281
+ assert.equal('node utils/setup.js', packageDotJson.scripts.preinstall);
282
+ assert.equal('node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js', packageDotJson.scripts.lint);
283
+ assert.equal('node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js --quiet', packageDotJson.scripts['lint:errors']);
284
+ assert.equal('mocha test/unit/adapterBaseTestUnit.js --LOG=error', packageDotJson.scripts['test:baseunit']);
285
+ assert.equal('mocha test/unit/adapterTestUnit.js --LOG=error', packageDotJson.scripts['test:unit']);
286
+ assert.equal('mocha test/integration/adapterTestIntegration.js --LOG=error', packageDotJson.scripts['test:integration']);
287
+ assert.equal('nyc --reporter html --reporter text mocha --reporter dot test/*', packageDotJson.scripts['test:cover']);
288
+ assert.equal('npm run test:baseunit && npm run test:unit && npm run test:integration', packageDotJson.scripts.test);
289
+ assert.equal('npm publish --registry=https://registry.npmjs.org --access=public', packageDotJson.scripts.deploy);
290
+ assert.equal('npm run deploy', packageDotJson.scripts.build);
291
+ done();
292
+ } catch (error) {
293
+ log.error(`Test Failure: ${error}`);
294
+ done(error);
295
+ }
296
+ });
297
+ it('package.json proper directories should be provided', (done) => {
298
+ try {
299
+ const packageDotJson = require('../../package.json');
300
+ assert.notEqual(undefined, packageDotJson.repository);
301
+ assert.notEqual(null, packageDotJson.repository);
302
+ assert.notEqual('', packageDotJson.repository);
303
+ assert.equal('git', packageDotJson.repository.type);
304
+ assert.equal('git@gitlab.com:itentialopensource/adapters/', packageDotJson.repository.url.substring(0, 43));
305
+ assert.equal('https://gitlab.com/itentialopensource/adapters/', packageDotJson.homepage.substring(0, 47));
306
+ done();
307
+ } catch (error) {
308
+ log.error(`Test Failure: ${error}`);
309
+ done(error);
310
+ }
311
+ });
312
+ it('package.json proper dependencies should be provided', (done) => {
313
+ try {
314
+ const packageDotJson = require('../../package.json');
315
+ assert.notEqual(undefined, packageDotJson.dependencies);
316
+ assert.notEqual(null, packageDotJson.dependencies);
317
+ assert.notEqual('', packageDotJson.dependencies);
318
+ assert.equal('^8.12.0', packageDotJson.dependencies.ajv);
319
+ assert.equal('^1.6.3', packageDotJson.dependencies.axios);
320
+ assert.equal('^11.0.0', packageDotJson.dependencies.commander);
321
+ assert.equal('^11.1.1', packageDotJson.dependencies['fs-extra']);
322
+ assert.equal('^10.2.0', packageDotJson.dependencies.mocha);
323
+ assert.equal('^2.0.1', packageDotJson.dependencies['mocha-param']);
324
+ assert.equal('^15.1.0', packageDotJson.dependencies.nyc);
325
+ assert.equal('^0.4.4', packageDotJson.dependencies.ping);
326
+ assert.equal('^1.4.10', packageDotJson.dependencies['readline-sync']);
327
+ assert.equal('^7.5.3', packageDotJson.dependencies.semver);
328
+ assert.equal('^3.9.0', packageDotJson.dependencies.winston);
329
+ done();
330
+ } catch (error) {
331
+ log.error(`Test Failure: ${error}`);
332
+ done(error);
333
+ }
334
+ });
335
+ it('package.json proper dev dependencies should be provided', (done) => {
336
+ try {
337
+ const packageDotJson = require('../../package.json');
338
+ assert.notEqual(undefined, packageDotJson.devDependencies);
339
+ assert.notEqual(null, packageDotJson.devDependencies);
340
+ assert.notEqual('', packageDotJson.devDependencies);
341
+ assert.equal('^4.3.7', packageDotJson.devDependencies.chai);
342
+ assert.equal('^8.44.0', packageDotJson.devDependencies.eslint);
343
+ assert.equal('^15.0.0', packageDotJson.devDependencies['eslint-config-airbnb-base']);
344
+ assert.equal('^2.27.5', packageDotJson.devDependencies['eslint-plugin-import']);
345
+ assert.equal('^3.1.0', packageDotJson.devDependencies['eslint-plugin-json']);
346
+ assert.equal('^3.18.0', packageDotJson.devDependencies.testdouble);
347
+ done();
348
+ } catch (error) {
349
+ log.error(`Test Failure: ${error}`);
350
+ done(error);
351
+ }
352
+ });
353
+ });
354
+
355
+ describe('pronghorn.json', () => {
356
+ it('should have a pronghorn.json', (done) => {
357
+ try {
358
+ fs.exists('pronghorn.json', (val) => {
359
+ assert.equal(true, val);
360
+ done();
361
+ });
362
+ } catch (error) {
363
+ log.error(`Test Failure: ${error}`);
364
+ done(error);
365
+ }
366
+ });
367
+ it('pronghorn.json should be customized', (done) => {
368
+ try {
369
+ const pronghornDotJson = require('../../pronghorn.json');
370
+ assert.notEqual(-1, pronghornDotJson.id.indexOf('godaddy'));
371
+ assert.equal('Adapter', pronghornDotJson.type);
372
+ assert.equal('Godaddy', pronghornDotJson.export);
373
+ assert.equal('Godaddy', pronghornDotJson.title);
374
+ assert.equal('adapter.js', pronghornDotJson.src);
375
+ done();
376
+ } catch (error) {
377
+ log.error(`Test Failure: ${error}`);
378
+ done(error);
379
+ }
380
+ });
381
+ it('pronghorn.json should contain generic adapter methods', (done) => {
382
+ try {
383
+ const pronghornDotJson = require('../../pronghorn.json');
384
+ assert.notEqual(undefined, pronghornDotJson.methods);
385
+ assert.notEqual(null, pronghornDotJson.methods);
386
+ assert.notEqual('', pronghornDotJson.methods);
387
+ assert.equal(true, Array.isArray(pronghornDotJson.methods));
388
+ assert.notEqual(0, pronghornDotJson.methods.length);
389
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapUpdateAdapterConfiguration'));
390
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapSuspendAdapter'));
391
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapUnsuspendAdapter'));
392
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapGetAdapterQueue'));
393
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapFindAdapterPath'));
394
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapTroubleshootAdapter'));
395
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapRunAdapterHealthcheck'));
396
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapRunAdapterConnectivity'));
397
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapRunAdapterBasicGet'));
398
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapMoveAdapterEntitiesToDB'));
399
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapDeactivateTasks'));
400
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapActivateTasks'));
401
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapPopulateEntityCache'));
402
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapRetrieveEntitiesCache'));
403
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'getDevice'));
404
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'getDevicesFiltered'));
405
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'isAlive'));
406
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'getConfig'));
407
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapGetDeviceCount'));
408
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapExpandedGenericAdapterRequest'));
409
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'genericAdapterRequest'));
410
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'genericAdapterRequestNoBasePath'));
411
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapRunAdapterLint'));
412
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapRunAdapterTests'));
413
+ assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'iapGetAdapterInventory'));
414
+ done();
415
+ } catch (error) {
416
+ log.error(`Test Failure: ${error}`);
417
+ done(error);
418
+ }
419
+ });
420
+ it('pronghorn.json should only expose workflow functions', (done) => {
421
+ try {
422
+ const pronghornDotJson = require('../../pronghorn.json');
423
+
424
+ for (let m = 0; m < pronghornDotJson.methods.length; m += 1) {
425
+ let found = false;
426
+ let paramissue = false;
427
+
428
+ for (let w = 0; w < wffunctions.length; w += 1) {
429
+ if (pronghornDotJson.methods[m].name === wffunctions[w]) {
430
+ found = true;
431
+ const methLine = execute(`grep " ${wffunctions[w]}(" adapter.js | grep "callback) {"`).toString();
432
+ let wfparams = [];
433
+
434
+ if (methLine && methLine.indexOf('(') >= 0 && methLine.indexOf(')') >= 0) {
435
+ const temp = methLine.substring(methLine.indexOf('(') + 1, methLine.lastIndexOf(')'));
436
+ wfparams = temp.split(',');
437
+
438
+ for (let t = 0; t < wfparams.length; t += 1) {
439
+ // remove default value from the parameter name
440
+ wfparams[t] = wfparams[t].substring(0, wfparams[t].search(/=/) > 0 ? wfparams[t].search(/#|\?|=/) : wfparams[t].length);
441
+ // remove spaces
442
+ wfparams[t] = wfparams[t].trim();
443
+
444
+ if (wfparams[t] === 'callback') {
445
+ wfparams.splice(t, 1);
446
+ }
447
+ }
448
+ }
449
+
450
+ // if there are inputs defined but not on the method line
451
+ if (wfparams.length === 0 && (pronghornDotJson.methods[m].input
452
+ && pronghornDotJson.methods[m].input.length > 0)) {
453
+ paramissue = true;
454
+ } else if (wfparams.length > 0 && (!pronghornDotJson.methods[m].input
455
+ || pronghornDotJson.methods[m].input.length === 0)) {
456
+ // if there are no inputs defined but there are on the method line
457
+ paramissue = true;
458
+ } else {
459
+ for (let p = 0; p < pronghornDotJson.methods[m].input.length; p += 1) {
460
+ let pfound = false;
461
+ for (let wfp = 0; wfp < wfparams.length; wfp += 1) {
462
+ if (pronghornDotJson.methods[m].input[p].name.toUpperCase() === wfparams[wfp].toUpperCase()) {
463
+ pfound = true;
464
+ }
465
+ }
466
+
467
+ if (!pfound) {
468
+ paramissue = true;
469
+ }
470
+ }
471
+ for (let wfp = 0; wfp < wfparams.length; wfp += 1) {
472
+ let pfound = false;
473
+ for (let p = 0; p < pronghornDotJson.methods[m].input.length; p += 1) {
474
+ if (pronghornDotJson.methods[m].input[p].name.toUpperCase() === wfparams[wfp].toUpperCase()) {
475
+ pfound = true;
476
+ }
477
+ }
478
+
479
+ if (!pfound) {
480
+ paramissue = true;
481
+ }
482
+ }
483
+ }
484
+
485
+ break;
486
+ }
487
+ }
488
+
489
+ if (!found) {
490
+ // this is the reason to go through both loops - log which ones are not found so
491
+ // they can be worked
492
+ log.error(`${pronghornDotJson.methods[m].name} not found in workflow functions`);
493
+ }
494
+ if (paramissue) {
495
+ // this is the reason to go through both loops - log which ones are not found so
496
+ // they can be worked
497
+ log.error(`${pronghornDotJson.methods[m].name} has a parameter mismatch`);
498
+ }
499
+ assert.equal(true, found);
500
+ assert.equal(false, paramissue);
501
+ }
502
+ done();
503
+ } catch (error) {
504
+ log.error(`Adapter Exception: ${error}`);
505
+ done(error);
506
+ }
507
+ }).timeout(attemptTimeout);
508
+ it('pronghorn.json should expose all workflow functions', (done) => {
509
+ try {
510
+ const pronghornDotJson = require('../../pronghorn.json');
511
+ for (let w = 0; w < wffunctions.length; w += 1) {
512
+ let found = false;
513
+
514
+ for (let m = 0; m < pronghornDotJson.methods.length; m += 1) {
515
+ if (pronghornDotJson.methods[m].name === wffunctions[w]) {
516
+ found = true;
517
+ break;
518
+ }
519
+ }
520
+
521
+ if (!found) {
522
+ // this is the reason to go through both loops - log which ones are not found so
523
+ // they can be worked
524
+ log.error(`${wffunctions[w]} not found in pronghorn.json`);
525
+ }
526
+ assert.equal(true, found);
527
+ }
528
+ done();
529
+ } catch (error) {
530
+ log.error(`Adapter Exception: ${error}`);
531
+ done(error);
532
+ }
533
+ });
534
+ it('pronghorn.json verify input/output schema objects', (done) => {
535
+ const verifySchema = (methodName, schema) => {
536
+ try {
537
+ ajv.compile(schema);
538
+ } catch (error) {
539
+ const errorMessage = `Invalid schema found in '${methodName}' method.
540
+ Schema => ${JSON.stringify(schema)}.
541
+ Details => ${error.message}`;
542
+ throw new Error(errorMessage);
543
+ }
544
+ };
545
+
546
+ try {
547
+ const pronghornDotJson = require('../../pronghorn.json');
548
+ const { methods } = pronghornDotJson;
549
+ for (let i = 0; i < methods.length; i += 1) {
550
+ for (let j = 0; j < methods[i].input.length; j += 1) {
551
+ const inputSchema = methods[i].input[j].schema;
552
+ if (inputSchema) {
553
+ verifySchema(methods[i].name, inputSchema);
554
+ }
555
+ }
556
+ const outputSchema = methods[i].output.schema;
557
+ if (outputSchema) {
558
+ verifySchema(methods[i].name, outputSchema);
559
+ }
560
+ }
561
+ done();
562
+ } catch (error) {
563
+ log.error(`Adapter Exception: ${error}`);
564
+ done(error);
565
+ }
566
+ });
567
+ });
568
+
569
+ describe('propertiesSchema.json', () => {
570
+ it('should have a propertiesSchema.json', (done) => {
571
+ try {
572
+ fs.exists('propertiesSchema.json', (val) => {
573
+ assert.equal(true, val);
574
+ done();
575
+ });
576
+ } catch (error) {
577
+ log.error(`Test Failure: ${error}`);
578
+ done(error);
579
+ }
580
+ });
581
+ it('propertiesSchema.json should be customized', (done) => {
582
+ try {
583
+ const propertiesDotJson = require('../../propertiesSchema.json');
584
+ assert.equal('adapter-godaddy', propertiesDotJson.$id);
585
+ assert.equal('object', propertiesDotJson.type);
586
+ assert.equal('http://json-schema.org/draft-07/schema#', propertiesDotJson.$schema);
587
+ done();
588
+ } catch (error) {
589
+ log.error(`Test Failure: ${error}`);
590
+ done(error);
591
+ }
592
+ });
593
+ it('propertiesSchema.json should contain generic adapter properties', (done) => {
594
+ try {
595
+ const propertiesDotJson = require('../../propertiesSchema.json');
596
+ assert.notEqual(undefined, propertiesDotJson.properties);
597
+ assert.notEqual(null, propertiesDotJson.properties);
598
+ assert.notEqual('', propertiesDotJson.properties);
599
+ assert.equal('string', propertiesDotJson.properties.host.type);
600
+ assert.equal('integer', propertiesDotJson.properties.port.type);
601
+ assert.equal('boolean', propertiesDotJson.properties.stub.type);
602
+ assert.equal('string', propertiesDotJson.properties.protocol.type);
603
+ assert.notEqual(undefined, propertiesDotJson.definitions.authentication);
604
+ assert.notEqual(null, propertiesDotJson.definitions.authentication);
605
+ assert.notEqual('', propertiesDotJson.definitions.authentication);
606
+ assert.equal('string', propertiesDotJson.definitions.authentication.properties.auth_method.type);
607
+ assert.equal('string', propertiesDotJson.definitions.authentication.properties.username.type);
608
+ assert.equal('string', propertiesDotJson.definitions.authentication.properties.password.type);
609
+ assert.equal('string', propertiesDotJson.definitions.authentication.properties.token.type);
610
+ assert.equal('integer', propertiesDotJson.definitions.authentication.properties.invalid_token_error.type);
611
+ assert.equal('integer', propertiesDotJson.definitions.authentication.properties.token_timeout.type);
612
+ assert.equal('string', propertiesDotJson.definitions.authentication.properties.token_cache.type);
613
+ assert.equal(true, Array.isArray(propertiesDotJson.definitions.authentication.properties.auth_field.type));
614
+ assert.equal(true, Array.isArray(propertiesDotJson.definitions.authentication.properties.auth_field_format.type));
615
+ assert.equal('boolean', propertiesDotJson.definitions.authentication.properties.auth_logging.type);
616
+ assert.equal('string', propertiesDotJson.definitions.authentication.properties.client_id.type);
617
+ assert.equal('string', propertiesDotJson.definitions.authentication.properties.client_secret.type);
618
+ assert.equal('string', propertiesDotJson.definitions.authentication.properties.grant_type.type);
619
+ assert.notEqual(undefined, propertiesDotJson.definitions.ssl);
620
+ assert.notEqual(null, propertiesDotJson.definitions.ssl);
621
+ assert.notEqual('', propertiesDotJson.definitions.ssl);
622
+ assert.equal('string', propertiesDotJson.definitions.ssl.properties.ecdhCurve.type);
623
+ assert.equal('boolean', propertiesDotJson.definitions.ssl.properties.enabled.type);
624
+ assert.equal('boolean', propertiesDotJson.definitions.ssl.properties.accept_invalid_cert.type);
625
+ assert.equal('string', propertiesDotJson.definitions.ssl.properties.ca_file.type);
626
+ assert.equal('string', propertiesDotJson.definitions.ssl.properties.key_file.type);
627
+ assert.equal('string', propertiesDotJson.definitions.ssl.properties.cert_file.type);
628
+ assert.equal('string', propertiesDotJson.definitions.ssl.properties.secure_protocol.type);
629
+ assert.equal('string', propertiesDotJson.definitions.ssl.properties.ciphers.type);
630
+ assert.equal('string', propertiesDotJson.properties.base_path.type);
631
+ assert.equal('string', propertiesDotJson.properties.version.type);
632
+ assert.equal('string', propertiesDotJson.properties.cache_location.type);
633
+ assert.equal('boolean', propertiesDotJson.properties.encode_pathvars.type);
634
+ assert.equal('boolean', propertiesDotJson.properties.encode_queryvars.type);
635
+ assert.equal(true, Array.isArray(propertiesDotJson.properties.save_metric.type));
636
+ assert.notEqual(undefined, propertiesDotJson.definitions);
637
+ assert.notEqual(null, propertiesDotJson.definitions);
638
+ assert.notEqual('', propertiesDotJson.definitions);
639
+ assert.notEqual(undefined, propertiesDotJson.definitions.healthcheck);
640
+ assert.notEqual(null, propertiesDotJson.definitions.healthcheck);
641
+ assert.notEqual('', propertiesDotJson.definitions.healthcheck);
642
+ assert.equal('string', propertiesDotJson.definitions.healthcheck.properties.type.type);
643
+ assert.equal('integer', propertiesDotJson.definitions.healthcheck.properties.frequency.type);
644
+ assert.equal('object', propertiesDotJson.definitions.healthcheck.properties.query_object.type);
645
+ assert.notEqual(undefined, propertiesDotJson.definitions.throttle);
646
+ assert.notEqual(null, propertiesDotJson.definitions.throttle);
647
+ assert.notEqual('', propertiesDotJson.definitions.throttle);
648
+ assert.equal('boolean', propertiesDotJson.definitions.throttle.properties.throttle_enabled.type);
649
+ assert.equal('integer', propertiesDotJson.definitions.throttle.properties.number_pronghorns.type);
650
+ assert.equal('string', propertiesDotJson.definitions.throttle.properties.sync_async.type);
651
+ assert.equal('integer', propertiesDotJson.definitions.throttle.properties.max_in_queue.type);
652
+ assert.equal('integer', propertiesDotJson.definitions.throttle.properties.concurrent_max.type);
653
+ assert.equal('integer', propertiesDotJson.definitions.throttle.properties.expire_timeout.type);
654
+ assert.equal('integer', propertiesDotJson.definitions.throttle.properties.avg_runtime.type);
655
+ assert.equal('array', propertiesDotJson.definitions.throttle.properties.priorities.type);
656
+ assert.notEqual(undefined, propertiesDotJson.definitions.request);
657
+ assert.notEqual(null, propertiesDotJson.definitions.request);
658
+ assert.notEqual('', propertiesDotJson.definitions.request);
659
+ assert.equal('integer', propertiesDotJson.definitions.request.properties.number_redirects.type);
660
+ assert.equal('integer', propertiesDotJson.definitions.request.properties.number_retries.type);
661
+ assert.equal(true, Array.isArray(propertiesDotJson.definitions.request.properties.limit_retry_error.type));
662
+ assert.equal('array', propertiesDotJson.definitions.request.properties.failover_codes.type);
663
+ assert.equal('integer', propertiesDotJson.definitions.request.properties.attempt_timeout.type);
664
+ assert.equal('object', propertiesDotJson.definitions.request.properties.global_request.type);
665
+ assert.equal('object', propertiesDotJson.definitions.request.properties.global_request.properties.payload.type);
666
+ assert.equal('object', propertiesDotJson.definitions.request.properties.global_request.properties.uriOptions.type);
667
+ assert.equal('object', propertiesDotJson.definitions.request.properties.global_request.properties.addlHeaders.type);
668
+ assert.equal('object', propertiesDotJson.definitions.request.properties.global_request.properties.authData.type);
669
+ assert.equal('boolean', propertiesDotJson.definitions.request.properties.healthcheck_on_timeout.type);
670
+ assert.equal('boolean', propertiesDotJson.definitions.request.properties.return_raw.type);
671
+ assert.equal('boolean', propertiesDotJson.definitions.request.properties.archiving.type);
672
+ assert.equal('boolean', propertiesDotJson.definitions.request.properties.return_request.type);
673
+ assert.notEqual(undefined, propertiesDotJson.definitions.proxy);
674
+ assert.notEqual(null, propertiesDotJson.definitions.proxy);
675
+ assert.notEqual('', propertiesDotJson.definitions.proxy);
676
+ assert.equal('boolean', propertiesDotJson.definitions.proxy.properties.enabled.type);
677
+ assert.equal('string', propertiesDotJson.definitions.proxy.properties.host.type);
678
+ assert.equal('integer', propertiesDotJson.definitions.proxy.properties.port.type);
679
+ assert.equal('string', propertiesDotJson.definitions.proxy.properties.protocol.type);
680
+ assert.equal('string', propertiesDotJson.definitions.proxy.properties.username.type);
681
+ assert.equal('string', propertiesDotJson.definitions.proxy.properties.password.type);
682
+ assert.notEqual(undefined, propertiesDotJson.definitions.mongo);
683
+ assert.notEqual(null, propertiesDotJson.definitions.mongo);
684
+ assert.notEqual('', propertiesDotJson.definitions.mongo);
685
+ assert.equal('string', propertiesDotJson.definitions.mongo.properties.host.type);
686
+ assert.equal('integer', propertiesDotJson.definitions.mongo.properties.port.type);
687
+ assert.equal('string', propertiesDotJson.definitions.mongo.properties.database.type);
688
+ assert.equal('string', propertiesDotJson.definitions.mongo.properties.username.type);
689
+ assert.equal('string', propertiesDotJson.definitions.mongo.properties.password.type);
690
+ assert.equal('string', propertiesDotJson.definitions.mongo.properties.replSet.type);
691
+ assert.equal('object', propertiesDotJson.definitions.mongo.properties.db_ssl.type);
692
+ assert.equal('boolean', propertiesDotJson.definitions.mongo.properties.db_ssl.properties.enabled.type);
693
+ assert.equal('boolean', propertiesDotJson.definitions.mongo.properties.db_ssl.properties.accept_invalid_cert.type);
694
+ assert.equal('string', propertiesDotJson.definitions.mongo.properties.db_ssl.properties.ca_file.type);
695
+ assert.equal('string', propertiesDotJson.definitions.mongo.properties.db_ssl.properties.key_file.type);
696
+ assert.equal('string', propertiesDotJson.definitions.mongo.properties.db_ssl.properties.cert_file.type);
697
+ assert.notEqual('', propertiesDotJson.definitions.devicebroker);
698
+ assert.equal('array', propertiesDotJson.definitions.devicebroker.properties.getDevice.type);
699
+ assert.equal('array', propertiesDotJson.definitions.devicebroker.properties.getDevicesFiltered.type);
700
+ assert.equal('array', propertiesDotJson.definitions.devicebroker.properties.isAlive.type);
701
+ assert.equal('array', propertiesDotJson.definitions.devicebroker.properties.getConfig.type);
702
+ assert.equal('array', propertiesDotJson.definitions.devicebroker.properties.getCount.type);
703
+ done();
704
+ } catch (error) {
705
+ log.error(`Test Failure: ${error}`);
706
+ done(error);
707
+ }
708
+ });
709
+ });
710
+
711
+ describe('error.json', () => {
712
+ it('should have an error.json', (done) => {
713
+ try {
714
+ fs.exists('error.json', (val) => {
715
+ assert.equal(true, val);
716
+ done();
717
+ });
718
+ } catch (error) {
719
+ log.error(`Test Failure: ${error}`);
720
+ done(error);
721
+ }
722
+ });
723
+ it('error.json should have standard adapter errors', (done) => {
724
+ try {
725
+ const errorDotJson = require('../../error.json');
726
+ assert.notEqual(undefined, errorDotJson.errors);
727
+ assert.notEqual(null, errorDotJson.errors);
728
+ assert.notEqual('', errorDotJson.errors);
729
+ assert.equal(true, Array.isArray(errorDotJson.errors));
730
+ assert.notEqual(0, errorDotJson.errors.length);
731
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.100'));
732
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.101'));
733
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.102'));
734
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.110'));
735
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.111'));
736
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.112'));
737
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.113'));
738
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.114'));
739
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.115'));
740
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.116'));
741
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.300'));
742
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.301'));
743
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.302'));
744
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.303'));
745
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.304'));
746
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.305'));
747
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.310'));
748
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.311'));
749
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.312'));
750
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.320'));
751
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.321'));
752
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.400'));
753
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.401'));
754
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.402'));
755
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.500'));
756
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.501'));
757
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.502'));
758
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.503'));
759
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.600'));
760
+ assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.900'));
761
+ done();
762
+ } catch (error) {
763
+ log.error(`Test Failure: ${error}`);
764
+ done(error);
765
+ }
766
+ });
767
+ });
768
+
769
+ describe('sampleProperties.json', () => {
770
+ it('should have a sampleProperties.json', (done) => {
771
+ try {
772
+ fs.exists('sampleProperties.json', (val) => {
773
+ assert.equal(true, val);
774
+ done();
775
+ });
776
+ } catch (error) {
777
+ log.error(`Test Failure: ${error}`);
778
+ done(error);
779
+ }
780
+ });
781
+ it('sampleProperties.json should contain generic adapter properties', (done) => {
782
+ try {
783
+ const sampleDotJson = require('../../sampleProperties.json');
784
+ assert.notEqual(-1, sampleDotJson.id.indexOf('godaddy'));
785
+ assert.equal('Godaddy', sampleDotJson.type);
786
+ assert.notEqual(undefined, sampleDotJson.properties);
787
+ assert.notEqual(null, sampleDotJson.properties);
788
+ assert.notEqual('', sampleDotJson.properties);
789
+ assert.notEqual(undefined, sampleDotJson.properties.host);
790
+ assert.notEqual(undefined, sampleDotJson.properties.port);
791
+ assert.notEqual(undefined, sampleDotJson.properties.stub);
792
+ assert.notEqual(undefined, sampleDotJson.properties.protocol);
793
+ assert.notEqual(undefined, sampleDotJson.properties.authentication);
794
+ assert.notEqual(null, sampleDotJson.properties.authentication);
795
+ assert.notEqual('', sampleDotJson.properties.authentication);
796
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.auth_method);
797
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.username);
798
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.password);
799
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.token);
800
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.invalid_token_error);
801
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.token_timeout);
802
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.token_cache);
803
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.auth_field);
804
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.auth_field_format);
805
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.auth_logging);
806
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.client_id);
807
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.client_secret);
808
+ assert.notEqual(undefined, sampleDotJson.properties.authentication.grant_type);
809
+ assert.notEqual(undefined, sampleDotJson.properties.ssl);
810
+ assert.notEqual(null, sampleDotJson.properties.ssl);
811
+ assert.notEqual('', sampleDotJson.properties.ssl);
812
+ assert.notEqual(undefined, sampleDotJson.properties.ssl.ecdhCurve);
813
+ assert.notEqual(undefined, sampleDotJson.properties.ssl.enabled);
814
+ assert.notEqual(undefined, sampleDotJson.properties.ssl.accept_invalid_cert);
815
+ assert.notEqual(undefined, sampleDotJson.properties.ssl.ca_file);
816
+ assert.notEqual(undefined, sampleDotJson.properties.ssl.key_file);
817
+ assert.notEqual(undefined, sampleDotJson.properties.ssl.cert_file);
818
+ assert.notEqual(undefined, sampleDotJson.properties.ssl.secure_protocol);
819
+ assert.notEqual(undefined, sampleDotJson.properties.ssl.ciphers);
820
+ assert.notEqual(undefined, sampleDotJson.properties.base_path);
821
+ assert.notEqual(undefined, sampleDotJson.properties.version);
822
+ assert.notEqual(undefined, sampleDotJson.properties.cache_location);
823
+ assert.notEqual(undefined, sampleDotJson.properties.encode_pathvars);
824
+ assert.notEqual(undefined, sampleDotJson.properties.encode_queryvars);
825
+ assert.notEqual(undefined, sampleDotJson.properties.save_metric);
826
+ assert.notEqual(undefined, sampleDotJson.properties.healthcheck);
827
+ assert.notEqual(null, sampleDotJson.properties.healthcheck);
828
+ assert.notEqual('', sampleDotJson.properties.healthcheck);
829
+ assert.notEqual(undefined, sampleDotJson.properties.healthcheck.type);
830
+ assert.notEqual(undefined, sampleDotJson.properties.healthcheck.frequency);
831
+ assert.notEqual(undefined, sampleDotJson.properties.healthcheck.query_object);
832
+ assert.notEqual(undefined, sampleDotJson.properties.throttle);
833
+ assert.notEqual(null, sampleDotJson.properties.throttle);
834
+ assert.notEqual('', sampleDotJson.properties.throttle);
835
+ assert.notEqual(undefined, sampleDotJson.properties.throttle.throttle_enabled);
836
+ assert.notEqual(undefined, sampleDotJson.properties.throttle.number_pronghorns);
837
+ assert.notEqual(undefined, sampleDotJson.properties.throttle.sync_async);
838
+ assert.notEqual(undefined, sampleDotJson.properties.throttle.max_in_queue);
839
+ assert.notEqual(undefined, sampleDotJson.properties.throttle.concurrent_max);
840
+ assert.notEqual(undefined, sampleDotJson.properties.throttle.expire_timeout);
841
+ assert.notEqual(undefined, sampleDotJson.properties.throttle.avg_runtime);
842
+ assert.notEqual(undefined, sampleDotJson.properties.throttle.priorities);
843
+ assert.notEqual(undefined, sampleDotJson.properties.request);
844
+ assert.notEqual(null, sampleDotJson.properties.request);
845
+ assert.notEqual('', sampleDotJson.properties.request);
846
+ assert.notEqual(undefined, sampleDotJson.properties.request.number_redirects);
847
+ assert.notEqual(undefined, sampleDotJson.properties.request.number_retries);
848
+ assert.notEqual(undefined, sampleDotJson.properties.request.limit_retry_error);
849
+ assert.notEqual(undefined, sampleDotJson.properties.request.failover_codes);
850
+ assert.notEqual(undefined, sampleDotJson.properties.request.attempt_timeout);
851
+ assert.notEqual(undefined, sampleDotJson.properties.request.global_request);
852
+ assert.notEqual(undefined, sampleDotJson.properties.request.global_request.payload);
853
+ assert.notEqual(undefined, sampleDotJson.properties.request.global_request.uriOptions);
854
+ assert.notEqual(undefined, sampleDotJson.properties.request.global_request.addlHeaders);
855
+ assert.notEqual(undefined, sampleDotJson.properties.request.global_request.authData);
856
+ assert.notEqual(undefined, sampleDotJson.properties.request.healthcheck_on_timeout);
857
+ assert.notEqual(undefined, sampleDotJson.properties.request.return_raw);
858
+ assert.notEqual(undefined, sampleDotJson.properties.request.archiving);
859
+ assert.notEqual(undefined, sampleDotJson.properties.request.return_request);
860
+ assert.notEqual(undefined, sampleDotJson.properties.proxy);
861
+ assert.notEqual(null, sampleDotJson.properties.proxy);
862
+ assert.notEqual('', sampleDotJson.properties.proxy);
863
+ assert.notEqual(undefined, sampleDotJson.properties.proxy.enabled);
864
+ assert.notEqual(undefined, sampleDotJson.properties.proxy.host);
865
+ assert.notEqual(undefined, sampleDotJson.properties.proxy.port);
866
+ assert.notEqual(undefined, sampleDotJson.properties.proxy.protocol);
867
+ assert.notEqual(undefined, sampleDotJson.properties.proxy.username);
868
+ assert.notEqual(undefined, sampleDotJson.properties.proxy.password);
869
+ assert.notEqual(undefined, sampleDotJson.properties.mongo);
870
+ assert.notEqual(null, sampleDotJson.properties.mongo);
871
+ assert.notEqual('', sampleDotJson.properties.mongo);
872
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.host);
873
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.port);
874
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.database);
875
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.username);
876
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.password);
877
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.replSet);
878
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.db_ssl);
879
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.db_ssl.enabled);
880
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.db_ssl.accept_invalid_cert);
881
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.db_ssl.ca_file);
882
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.db_ssl.key_file);
883
+ assert.notEqual(undefined, sampleDotJson.properties.mongo.db_ssl.cert_file);
884
+ assert.notEqual(undefined, sampleDotJson.properties.devicebroker);
885
+ assert.notEqual(undefined, sampleDotJson.properties.devicebroker.getDevice);
886
+ assert.notEqual(undefined, sampleDotJson.properties.devicebroker.getDevicesFiltered);
887
+ assert.notEqual(undefined, sampleDotJson.properties.devicebroker.isAlive);
888
+ assert.notEqual(undefined, sampleDotJson.properties.devicebroker.getConfig);
889
+ assert.notEqual(undefined, sampleDotJson.properties.devicebroker.getCount);
890
+ assert.notEqual(undefined, sampleDotJson.properties.cache);
891
+ assert.notEqual(undefined, sampleDotJson.properties.cache.entities);
892
+ done();
893
+ } catch (error) {
894
+ log.error(`Test Failure: ${error}`);
895
+ done(error);
896
+ }
897
+ });
898
+ });
899
+
900
+ describe('#checkProperties', () => {
901
+ it('should have a checkProperties function', (done) => {
902
+ try {
903
+ assert.equal(true, typeof a.checkProperties === 'function');
904
+ done();
905
+ } catch (error) {
906
+ log.error(`Test Failure: ${error}`);
907
+ done(error);
908
+ }
909
+ });
910
+ it('the sample properties should be good - if failure change the log level', (done) => {
911
+ try {
912
+ const samplePropsJson = require('../../sampleProperties.json');
913
+ const clean = a.checkProperties(samplePropsJson.properties);
914
+
915
+ try {
916
+ assert.notEqual(0, Object.keys(clean));
917
+ assert.equal(undefined, clean.exception);
918
+ assert.notEqual(undefined, clean.host);
919
+ assert.notEqual(null, clean.host);
920
+ assert.notEqual('', clean.host);
921
+ done();
922
+ } catch (err) {
923
+ log.error(`Test Failure: ${err}`);
924
+ done(err);
925
+ }
926
+ } catch (error) {
927
+ log.error(`Adapter Exception: ${error}`);
928
+ done(error);
929
+ }
930
+ }).timeout(attemptTimeout);
931
+ });
932
+
933
+ describe('README.md', () => {
934
+ it('should have a README', (done) => {
935
+ try {
936
+ fs.exists('README.md', (val) => {
937
+ assert.equal(true, val);
938
+ done();
939
+ });
940
+ } catch (error) {
941
+ log.error(`Test Failure: ${error}`);
942
+ done(error);
943
+ }
944
+ });
945
+ it('README.md should be customized', (done) => {
946
+ try {
947
+ fs.readFile('README.md', 'utf8', (err, data) => {
948
+ assert.equal(-1, data.indexOf('[System]'));
949
+ assert.equal(-1, data.indexOf('[system]'));
950
+ assert.equal(-1, data.indexOf('[version]'));
951
+ assert.equal(-1, data.indexOf('[namespace]'));
952
+ done();
953
+ });
954
+ } catch (error) {
955
+ log.error(`Test Failure: ${error}`);
956
+ done(error);
957
+ }
958
+ });
959
+ });
960
+
961
+ describe('#connect', () => {
962
+ it('should have a connect function', (done) => {
963
+ try {
964
+ assert.equal(true, typeof a.connect === 'function');
965
+ done();
966
+ } catch (error) {
967
+ log.error(`Test Failure: ${error}`);
968
+ done(error);
969
+ }
970
+ });
971
+ });
972
+
973
+ describe('#healthCheck', () => {
974
+ it('should have a healthCheck function', (done) => {
975
+ try {
976
+ assert.equal(true, typeof a.healthCheck === 'function');
977
+ done();
978
+ } catch (error) {
979
+ log.error(`Test Failure: ${error}`);
980
+ done(error);
981
+ }
982
+ });
983
+ });
984
+
985
+ describe('#iapUpdateAdapterConfiguration', () => {
986
+ it('should have a iapUpdateAdapterConfiguration function', (done) => {
987
+ try {
988
+ assert.equal(true, typeof a.iapUpdateAdapterConfiguration === 'function');
989
+ done();
990
+ } catch (error) {
991
+ log.error(`Test Failure: ${error}`);
992
+ done(error);
993
+ }
994
+ });
995
+ });
996
+
997
+ describe('#iapSuspendAdapter', () => {
998
+ it('should have a iapSuspendAdapter function', (done) => {
999
+ try {
1000
+ assert.equal(true, typeof a.iapSuspendAdapter === 'function');
1001
+ done();
1002
+ } catch (error) {
1003
+ log.error(`Test Failure: ${error}`);
1004
+ done(error);
1005
+ }
1006
+ });
1007
+ });
1008
+
1009
+ describe('#iapUnsuspendAdapter', () => {
1010
+ it('should have a iapUnsuspendAdapter function', (done) => {
1011
+ try {
1012
+ assert.equal(true, typeof a.iapUnsuspendAdapter === 'function');
1013
+ done();
1014
+ } catch (error) {
1015
+ log.error(`Test Failure: ${error}`);
1016
+ done(error);
1017
+ }
1018
+ });
1019
+ });
1020
+
1021
+ describe('#iapGetAdapterQueue', () => {
1022
+ it('should have a iapGetAdapterQueue function', (done) => {
1023
+ try {
1024
+ assert.equal(true, typeof a.iapGetAdapterQueue === 'function');
1025
+ done();
1026
+ } catch (error) {
1027
+ log.error(`Test Failure: ${error}`);
1028
+ done(error);
1029
+ }
1030
+ });
1031
+ });
1032
+
1033
+ describe('#iapFindAdapterPath', () => {
1034
+ it('should have a iapFindAdapterPath function', (done) => {
1035
+ try {
1036
+ assert.equal(true, typeof a.iapFindAdapterPath === 'function');
1037
+ done();
1038
+ } catch (error) {
1039
+ log.error(`Test Failure: ${error}`);
1040
+ done(error);
1041
+ }
1042
+ });
1043
+ it('iapFindAdapterPath should find atleast one path that matches', (done) => {
1044
+ try {
1045
+ a.iapFindAdapterPath('{base_path}/{version}', (data, error) => {
1046
+ try {
1047
+ assert.equal(undefined, error);
1048
+ assert.notEqual(undefined, data);
1049
+ assert.notEqual(null, data);
1050
+ assert.equal(true, data.found);
1051
+ assert.notEqual(undefined, data.foundIn);
1052
+ assert.notEqual(null, data.foundIn);
1053
+ assert.notEqual(0, data.foundIn.length);
1054
+ done();
1055
+ } catch (err) {
1056
+ log.error(`Test Failure: ${err}`);
1057
+ done(err);
1058
+ }
1059
+ });
1060
+ } catch (error) {
1061
+ log.error(`Adapter Exception: ${error}`);
1062
+ done(error);
1063
+ }
1064
+ }).timeout(attemptTimeout);
1065
+ });
1066
+
1067
+ describe('#iapTroubleshootAdapter', () => {
1068
+ it('should have a iapTroubleshootAdapter function', (done) => {
1069
+ try {
1070
+ assert.equal(true, typeof a.iapTroubleshootAdapter === 'function');
1071
+ done();
1072
+ } catch (error) {
1073
+ log.error(`Test Failure: ${error}`);
1074
+ done(error);
1075
+ }
1076
+ });
1077
+ });
1078
+
1079
+ describe('#iapRunAdapterHealthcheck', () => {
1080
+ it('should have a iapRunAdapterHealthcheck function', (done) => {
1081
+ try {
1082
+ assert.equal(true, typeof a.iapRunAdapterHealthcheck === 'function');
1083
+ done();
1084
+ } catch (error) {
1085
+ log.error(`Test Failure: ${error}`);
1086
+ done(error);
1087
+ }
1088
+ });
1089
+ });
1090
+
1091
+ describe('#iapRunAdapterConnectivity', () => {
1092
+ it('should have a iapRunAdapterConnectivity function', (done) => {
1093
+ try {
1094
+ assert.equal(true, typeof a.iapRunAdapterConnectivity === 'function');
1095
+ done();
1096
+ } catch (error) {
1097
+ log.error(`Test Failure: ${error}`);
1098
+ done(error);
1099
+ }
1100
+ });
1101
+ });
1102
+
1103
+ describe('#iapRunAdapterBasicGet', () => {
1104
+ it('should have a iapRunAdapterBasicGet function', (done) => {
1105
+ try {
1106
+ assert.equal(true, typeof a.iapRunAdapterBasicGet === 'function');
1107
+ done();
1108
+ } catch (error) {
1109
+ log.error(`Test Failure: ${error}`);
1110
+ done(error);
1111
+ }
1112
+ });
1113
+ });
1114
+
1115
+ describe('#iapMoveAdapterEntitiesToDB', () => {
1116
+ it('should have a iapMoveAdapterEntitiesToDB function', (done) => {
1117
+ try {
1118
+ assert.equal(true, typeof a.iapMoveAdapterEntitiesToDB === 'function');
1119
+ done();
1120
+ } catch (error) {
1121
+ log.error(`Test Failure: ${error}`);
1122
+ done(error);
1123
+ }
1124
+ });
1125
+ });
1126
+
1127
+ describe('#checkActionFiles', () => {
1128
+ it('should have a checkActionFiles function', (done) => {
1129
+ try {
1130
+ assert.equal(true, typeof a.checkActionFiles === 'function');
1131
+ done();
1132
+ } catch (error) {
1133
+ log.error(`Test Failure: ${error}`);
1134
+ done(error);
1135
+ }
1136
+ });
1137
+ it('the action files should be good - if failure change the log level as most issues are warnings', (done) => {
1138
+ try {
1139
+ const clean = a.checkActionFiles();
1140
+
1141
+ try {
1142
+ for (let c = 0; c < clean.length; c += 1) {
1143
+ log.error(clean[c]);
1144
+ }
1145
+ assert.equal(0, clean.length);
1146
+ done();
1147
+ } catch (err) {
1148
+ log.error(`Test Failure: ${err}`);
1149
+ done(err);
1150
+ }
1151
+ } catch (error) {
1152
+ log.error(`Adapter Exception: ${error}`);
1153
+ done(error);
1154
+ }
1155
+ }).timeout(attemptTimeout);
1156
+ });
1157
+
1158
+ describe('#encryptProperty', () => {
1159
+ it('should have a encryptProperty function', (done) => {
1160
+ try {
1161
+ assert.equal(true, typeof a.encryptProperty === 'function');
1162
+ done();
1163
+ } catch (error) {
1164
+ log.error(`Test Failure: ${error}`);
1165
+ done(error);
1166
+ }
1167
+ });
1168
+ it('should get base64 encoded property', (done) => {
1169
+ try {
1170
+ a.encryptProperty('testing', 'base64', (data, error) => {
1171
+ try {
1172
+ assert.equal(undefined, error);
1173
+ assert.notEqual(undefined, data);
1174
+ assert.notEqual(null, data);
1175
+ assert.notEqual(undefined, data.response);
1176
+ assert.notEqual(null, data.response);
1177
+ assert.equal(0, data.response.indexOf('{code}'));
1178
+ done();
1179
+ } catch (err) {
1180
+ log.error(`Test Failure: ${err}`);
1181
+ done(err);
1182
+ }
1183
+ });
1184
+ } catch (error) {
1185
+ log.error(`Adapter Exception: ${error}`);
1186
+ done(error);
1187
+ }
1188
+ }).timeout(attemptTimeout);
1189
+ it('should get encrypted property', (done) => {
1190
+ try {
1191
+ a.encryptProperty('testing', 'encrypt', (data, error) => {
1192
+ try {
1193
+ assert.equal(undefined, error);
1194
+ assert.notEqual(undefined, data);
1195
+ assert.notEqual(null, data);
1196
+ assert.notEqual(undefined, data.response);
1197
+ assert.notEqual(null, data.response);
1198
+ assert.equal(0, data.response.indexOf('{crypt}'));
1199
+ done();
1200
+ } catch (err) {
1201
+ log.error(`Test Failure: ${err}`);
1202
+ done(err);
1203
+ }
1204
+ });
1205
+ } catch (error) {
1206
+ log.error(`Adapter Exception: ${error}`);
1207
+ done(error);
1208
+ }
1209
+ }).timeout(attemptTimeout);
1210
+ });
1211
+
1212
+ describe('#iapDeactivateTasks', () => {
1213
+ it('should have a iapDeactivateTasks function', (done) => {
1214
+ try {
1215
+ assert.equal(true, typeof a.iapDeactivateTasks === 'function');
1216
+ done();
1217
+ } catch (error) {
1218
+ log.error(`Test Failure: ${error}`);
1219
+ done(error);
1220
+ }
1221
+ });
1222
+ });
1223
+
1224
+ describe('#iapActivateTasks', () => {
1225
+ it('should have a iapActivateTasks function', (done) => {
1226
+ try {
1227
+ assert.equal(true, typeof a.iapActivateTasks === 'function');
1228
+ done();
1229
+ } catch (error) {
1230
+ log.error(`Test Failure: ${error}`);
1231
+ done(error);
1232
+ }
1233
+ });
1234
+ });
1235
+
1236
+ describe('#iapPopulateEntityCache', () => {
1237
+ it('should have a iapPopulateEntityCache function', (done) => {
1238
+ try {
1239
+ assert.equal(true, typeof a.iapPopulateEntityCache === 'function');
1240
+ done();
1241
+ } catch (error) {
1242
+ log.error(`Test Failure: ${error}`);
1243
+ done(error);
1244
+ }
1245
+ });
1246
+ });
1247
+
1248
+ describe('#iapRetrieveEntitiesCache', () => {
1249
+ it('should have a iapRetrieveEntitiesCache function', (done) => {
1250
+ try {
1251
+ assert.equal(true, typeof a.iapRetrieveEntitiesCache === 'function');
1252
+ done();
1253
+ } catch (error) {
1254
+ log.error(`Test Failure: ${error}`);
1255
+ done(error);
1256
+ }
1257
+ });
1258
+ });
1259
+
1260
+ describe('#hasEntities', () => {
1261
+ it('should have a hasEntities function', (done) => {
1262
+ try {
1263
+ assert.equal(true, typeof a.hasEntities === 'function');
1264
+ done();
1265
+ } catch (error) {
1266
+ log.error(`Test Failure: ${error}`);
1267
+ done(error);
1268
+ }
1269
+ });
1270
+ });
1271
+
1272
+ describe('#getDevice', () => {
1273
+ it('should have a getDevice function', (done) => {
1274
+ try {
1275
+ assert.equal(true, typeof a.getDevice === 'function');
1276
+ done();
1277
+ } catch (error) {
1278
+ log.error(`Test Failure: ${error}`);
1279
+ done(error);
1280
+ }
1281
+ });
1282
+ });
1283
+
1284
+ describe('#getDevicesFiltered', () => {
1285
+ it('should have a getDevicesFiltered function', (done) => {
1286
+ try {
1287
+ assert.equal(true, typeof a.getDevicesFiltered === 'function');
1288
+ done();
1289
+ } catch (error) {
1290
+ log.error(`Test Failure: ${error}`);
1291
+ done(error);
1292
+ }
1293
+ });
1294
+ });
1295
+
1296
+ describe('#isAlive', () => {
1297
+ it('should have a isAlive function', (done) => {
1298
+ try {
1299
+ assert.equal(true, typeof a.isAlive === 'function');
1300
+ done();
1301
+ } catch (error) {
1302
+ log.error(`Test Failure: ${error}`);
1303
+ done(error);
1304
+ }
1305
+ });
1306
+ });
1307
+
1308
+ describe('#getConfig', () => {
1309
+ it('should have a getConfig function', (done) => {
1310
+ try {
1311
+ assert.equal(true, typeof a.getConfig === 'function');
1312
+ done();
1313
+ } catch (error) {
1314
+ log.error(`Test Failure: ${error}`);
1315
+ done(error);
1316
+ }
1317
+ });
1318
+ });
1319
+
1320
+ describe('#iapGetDeviceCount', () => {
1321
+ it('should have a iapGetDeviceCount function', (done) => {
1322
+ try {
1323
+ assert.equal(true, typeof a.iapGetDeviceCount === 'function');
1324
+ done();
1325
+ } catch (error) {
1326
+ log.error(`Test Failure: ${error}`);
1327
+ done(error);
1328
+ }
1329
+ });
1330
+ });
1331
+
1332
+ describe('#iapExpandedGenericAdapterRequest', () => {
1333
+ it('should have a iapExpandedGenericAdapterRequest function', (done) => {
1334
+ try {
1335
+ assert.equal(true, typeof a.iapExpandedGenericAdapterRequest === 'function');
1336
+ done();
1337
+ } catch (error) {
1338
+ log.error(`Test Failure: ${error}`);
1339
+ done(error);
1340
+ }
1341
+ });
1342
+ });
1343
+
1344
+ describe('#genericAdapterRequest', () => {
1345
+ it('should have a genericAdapterRequest function', (done) => {
1346
+ try {
1347
+ assert.equal(true, typeof a.genericAdapterRequest === 'function');
1348
+ done();
1349
+ } catch (error) {
1350
+ log.error(`Test Failure: ${error}`);
1351
+ done(error);
1352
+ }
1353
+ });
1354
+ });
1355
+
1356
+ describe('#genericAdapterRequestNoBasePath', () => {
1357
+ it('should have a genericAdapterRequestNoBasePath function', (done) => {
1358
+ try {
1359
+ assert.equal(true, typeof a.genericAdapterRequestNoBasePath === 'function');
1360
+ done();
1361
+ } catch (error) {
1362
+ log.error(`Test Failure: ${error}`);
1363
+ done(error);
1364
+ }
1365
+ });
1366
+ });
1367
+
1368
+ describe('#iapRunAdapterLint', () => {
1369
+ it('should have a iapRunAdapterLint function', (done) => {
1370
+ try {
1371
+ assert.equal(true, typeof a.iapRunAdapterLint === 'function');
1372
+ done();
1373
+ } catch (error) {
1374
+ log.error(`Test Failure: ${error}`);
1375
+ done(error);
1376
+ }
1377
+ });
1378
+ it('retrieve the lint results', (done) => {
1379
+ try {
1380
+ a.iapRunAdapterLint((data, error) => {
1381
+ try {
1382
+ assert.equal(undefined, error);
1383
+ assert.notEqual(undefined, data);
1384
+ assert.notEqual(null, data);
1385
+ assert.notEqual(undefined, data.status);
1386
+ assert.notEqual(null, data.status);
1387
+ assert.equal('SUCCESS', data.status);
1388
+ done();
1389
+ } catch (err) {
1390
+ log.error(`Test Failure: ${err}`);
1391
+ done(err);
1392
+ }
1393
+ });
1394
+ } catch (error) {
1395
+ log.error(`Adapter Exception: ${error}`);
1396
+ done(error);
1397
+ }
1398
+ }).timeout(attemptTimeout);
1399
+ });
1400
+
1401
+ describe('#iapRunAdapterTests', () => {
1402
+ it('should have a iapRunAdapterTests function', (done) => {
1403
+ try {
1404
+ assert.equal(true, typeof a.iapRunAdapterTests === 'function');
1405
+ done();
1406
+ } catch (error) {
1407
+ log.error(`Test Failure: ${error}`);
1408
+ done(error);
1409
+ }
1410
+ });
1411
+ });
1412
+
1413
+ describe('#iapGetAdapterInventory', () => {
1414
+ it('should have a iapGetAdapterInventory function', (done) => {
1415
+ try {
1416
+ assert.equal(true, typeof a.iapGetAdapterInventory === 'function');
1417
+ done();
1418
+ } catch (error) {
1419
+ log.error(`Test Failure: ${error}`);
1420
+ done(error);
1421
+ }
1422
+ });
1423
+ it('retrieve the inventory', (done) => {
1424
+ try {
1425
+ a.iapGetAdapterInventory((data, error) => {
1426
+ try {
1427
+ assert.equal(undefined, error);
1428
+ assert.notEqual(undefined, data);
1429
+ assert.notEqual(null, data);
1430
+ done();
1431
+ } catch (err) {
1432
+ log.error(`Test Failure: ${err}`);
1433
+ done(err);
1434
+ }
1435
+ });
1436
+ } catch (error) {
1437
+ log.error(`Adapter Exception: ${error}`);
1438
+ done(error);
1439
+ }
1440
+ }).timeout(attemptTimeout);
1441
+ });
1442
+ describe('metadata.json', () => {
1443
+ it('should have a metadata.json', (done) => {
1444
+ try {
1445
+ fs.exists('metadata.json', (val) => {
1446
+ assert.equal(true, val);
1447
+ done();
1448
+ });
1449
+ } catch (error) {
1450
+ log.error(`Test Failure: ${error}`);
1451
+ done(error);
1452
+ }
1453
+ });
1454
+ it('metadata.json is customized', (done) => {
1455
+ try {
1456
+ const metadataDotJson = require('../../metadata.json');
1457
+ assert.equal('adapter-godaddy', metadataDotJson.name);
1458
+ assert.notEqual(undefined, metadataDotJson.webName);
1459
+ assert.notEqual(null, metadataDotJson.webName);
1460
+ assert.notEqual('', metadataDotJson.webName);
1461
+ assert.equal('Adapter', metadataDotJson.type);
1462
+ done();
1463
+ } catch (error) {
1464
+ log.error(`Test Failure: ${error}`);
1465
+ done(error);
1466
+ }
1467
+ });
1468
+ it('metadata.json contains accurate documentation', (done) => {
1469
+ try {
1470
+ const metadataDotJson = require('../../metadata.json');
1471
+ assert.notEqual(undefined, metadataDotJson.documentation);
1472
+ assert.equal('https://www.npmjs.com/package/@itentialopensource/adapter-godaddy', metadataDotJson.documentation.npmLink);
1473
+ assert.equal('https://docs.itential.com/opensource/docs/troubleshooting-an-adapter', metadataDotJson.documentation.faqLink);
1474
+ assert.equal('https://gitlab.com/itentialopensource/adapters/contributing-guide', metadataDotJson.documentation.contributeLink);
1475
+ assert.equal('https://itential.atlassian.net/servicedesk/customer/portals', metadataDotJson.documentation.issueLink);
1476
+ done();
1477
+ } catch (error) {
1478
+ log.error(`Test Failure: ${error}`);
1479
+ done(error);
1480
+ }
1481
+ });
1482
+ it('metadata.json has related items', (done) => {
1483
+ try {
1484
+ const metadataDotJson = require('../../metadata.json');
1485
+ assert.notEqual(undefined, metadataDotJson.relatedItems);
1486
+ assert.notEqual(undefined, metadataDotJson.relatedItems.adapters);
1487
+ assert.notEqual(undefined, metadataDotJson.relatedItems.integrations);
1488
+ assert.notEqual(undefined, metadataDotJson.relatedItems.ecosystemApplications);
1489
+ assert.notEqual(undefined, metadataDotJson.relatedItems.workflowProjects);
1490
+ assert.notEqual(undefined, metadataDotJson.relatedItems.transformationProjects);
1491
+ assert.notEqual(undefined, metadataDotJson.relatedItems.exampleProjects);
1492
+ done();
1493
+ } catch (error) {
1494
+ log.error(`Test Failure: ${error}`);
1495
+ done(error);
1496
+ }
1497
+ });
1498
+ });
1499
+ /*
1500
+ -----------------------------------------------------------------------
1501
+ -----------------------------------------------------------------------
1502
+ *** All code above this comment will be replaced during a migration ***
1503
+ ******************* DO NOT REMOVE THIS COMMENT BLOCK ******************
1504
+ -----------------------------------------------------------------------
1505
+ -----------------------------------------------------------------------
1506
+ */
1507
+
1508
+ describe('#deleteListings - errors', () => {
1509
+ it('should have a deleteListings function', (done) => {
1510
+ try {
1511
+ assert.equal(true, typeof a.deleteListings === 'function');
1512
+ done();
1513
+ } catch (error) {
1514
+ log.error(`Test Failure: ${error}`);
1515
+ done(error);
1516
+ }
1517
+ }).timeout(attemptTimeout);
1518
+ it('should error if - missing domains', (done) => {
1519
+ try {
1520
+ a.deleteListings(null, (data, error) => {
1521
+ try {
1522
+ const displayE = 'domains is required';
1523
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-deleteListings', displayE);
1524
+ done();
1525
+ } catch (err) {
1526
+ log.error(`Test Failure: ${err}`);
1527
+ done(err);
1528
+ }
1529
+ });
1530
+ } catch (error) {
1531
+ log.error(`Adapter Exception: ${error}`);
1532
+ done(error);
1533
+ }
1534
+ }).timeout(attemptTimeout);
1535
+ });
1536
+
1537
+ describe('#addExpiryListings - errors', () => {
1538
+ it('should have a addExpiryListings function', (done) => {
1539
+ try {
1540
+ assert.equal(true, typeof a.addExpiryListings === 'function');
1541
+ done();
1542
+ } catch (error) {
1543
+ log.error(`Test Failure: ${error}`);
1544
+ done(error);
1545
+ }
1546
+ }).timeout(attemptTimeout);
1547
+ it('should error if - missing expiryListings', (done) => {
1548
+ try {
1549
+ a.addExpiryListings(null, (data, error) => {
1550
+ try {
1551
+ const displayE = 'expiryListings is required';
1552
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-addExpiryListings', displayE);
1553
+ done();
1554
+ } catch (err) {
1555
+ log.error(`Test Failure: ${err}`);
1556
+ done(err);
1557
+ }
1558
+ });
1559
+ } catch (error) {
1560
+ log.error(`Adapter Exception: ${error}`);
1561
+ done(error);
1562
+ }
1563
+ }).timeout(attemptTimeout);
1564
+ });
1565
+
1566
+ describe('#getTickets - errors', () => {
1567
+ it('should have a getTickets function', (done) => {
1568
+ try {
1569
+ assert.equal(true, typeof a.getTickets === 'function');
1570
+ done();
1571
+ } catch (error) {
1572
+ log.error(`Test Failure: ${error}`);
1573
+ done(error);
1574
+ }
1575
+ }).timeout(attemptTimeout);
1576
+ });
1577
+
1578
+ describe('#createTicket - errors', () => {
1579
+ it('should have a createTicket function', (done) => {
1580
+ try {
1581
+ assert.equal(true, typeof a.createTicket === 'function');
1582
+ done();
1583
+ } catch (error) {
1584
+ log.error(`Test Failure: ${error}`);
1585
+ done(error);
1586
+ }
1587
+ }).timeout(attemptTimeout);
1588
+ it('should error if - missing body', (done) => {
1589
+ try {
1590
+ a.createTicket(null, (data, error) => {
1591
+ try {
1592
+ const displayE = 'body is required';
1593
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-createTicket', displayE);
1594
+ done();
1595
+ } catch (err) {
1596
+ log.error(`Test Failure: ${err}`);
1597
+ done(err);
1598
+ }
1599
+ });
1600
+ } catch (error) {
1601
+ log.error(`Adapter Exception: ${error}`);
1602
+ done(error);
1603
+ }
1604
+ }).timeout(attemptTimeout);
1605
+ });
1606
+
1607
+ describe('#getTicketInfo - errors', () => {
1608
+ it('should have a getTicketInfo function', (done) => {
1609
+ try {
1610
+ assert.equal(true, typeof a.getTicketInfo === 'function');
1611
+ done();
1612
+ } catch (error) {
1613
+ log.error(`Test Failure: ${error}`);
1614
+ done(error);
1615
+ }
1616
+ }).timeout(attemptTimeout);
1617
+ it('should error if - missing ticketId', (done) => {
1618
+ try {
1619
+ a.getTicketInfo(null, (data, error) => {
1620
+ try {
1621
+ const displayE = 'ticketId is required';
1622
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getTicketInfo', displayE);
1623
+ done();
1624
+ } catch (err) {
1625
+ log.error(`Test Failure: ${err}`);
1626
+ done(err);
1627
+ }
1628
+ });
1629
+ } catch (error) {
1630
+ log.error(`Adapter Exception: ${error}`);
1631
+ done(error);
1632
+ }
1633
+ }).timeout(attemptTimeout);
1634
+ });
1635
+
1636
+ describe('#getAgreements - errors', () => {
1637
+ it('should have a getAgreements function', (done) => {
1638
+ try {
1639
+ assert.equal(true, typeof a.getAgreements === 'function');
1640
+ done();
1641
+ } catch (error) {
1642
+ log.error(`Test Failure: ${error}`);
1643
+ done(error);
1644
+ }
1645
+ }).timeout(attemptTimeout);
1646
+ it('should error if - missing keys', (done) => {
1647
+ try {
1648
+ a.getAgreements(null, (data, error) => {
1649
+ try {
1650
+ const displayE = 'keys is required';
1651
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getAgreements', displayE);
1652
+ done();
1653
+ } catch (err) {
1654
+ log.error(`Test Failure: ${err}`);
1655
+ done(err);
1656
+ }
1657
+ });
1658
+ } catch (error) {
1659
+ log.error(`Adapter Exception: ${error}`);
1660
+ done(error);
1661
+ }
1662
+ }).timeout(attemptTimeout);
1663
+ });
1664
+
1665
+ describe('#certificateCreate - errors', () => {
1666
+ it('should have a certificateCreate function', (done) => {
1667
+ try {
1668
+ assert.equal(true, typeof a.certificateCreate === 'function');
1669
+ done();
1670
+ } catch (error) {
1671
+ log.error(`Test Failure: ${error}`);
1672
+ done(error);
1673
+ }
1674
+ }).timeout(attemptTimeout);
1675
+ it('should error if - missing certificateCreate', (done) => {
1676
+ try {
1677
+ a.certificateCreate(null, (data, error) => {
1678
+ try {
1679
+ const displayE = 'certificateCreate is required';
1680
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-certificateCreate', displayE);
1681
+ done();
1682
+ } catch (err) {
1683
+ log.error(`Test Failure: ${err}`);
1684
+ done(err);
1685
+ }
1686
+ });
1687
+ } catch (error) {
1688
+ log.error(`Adapter Exception: ${error}`);
1689
+ done(error);
1690
+ }
1691
+ }).timeout(attemptTimeout);
1692
+ });
1693
+
1694
+ describe('#certificateValidate - errors', () => {
1695
+ it('should have a certificateValidate function', (done) => {
1696
+ try {
1697
+ assert.equal(true, typeof a.certificateValidate === 'function');
1698
+ done();
1699
+ } catch (error) {
1700
+ log.error(`Test Failure: ${error}`);
1701
+ done(error);
1702
+ }
1703
+ }).timeout(attemptTimeout);
1704
+ it('should error if - missing certificateCreate', (done) => {
1705
+ try {
1706
+ a.certificateValidate(null, (data, error) => {
1707
+ try {
1708
+ const displayE = 'certificateCreate is required';
1709
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-certificateValidate', displayE);
1710
+ done();
1711
+ } catch (err) {
1712
+ log.error(`Test Failure: ${err}`);
1713
+ done(err);
1714
+ }
1715
+ });
1716
+ } catch (error) {
1717
+ log.error(`Adapter Exception: ${error}`);
1718
+ done(error);
1719
+ }
1720
+ }).timeout(attemptTimeout);
1721
+ });
1722
+
1723
+ describe('#certificateGet - errors', () => {
1724
+ it('should have a certificateGet function', (done) => {
1725
+ try {
1726
+ assert.equal(true, typeof a.certificateGet === 'function');
1727
+ done();
1728
+ } catch (error) {
1729
+ log.error(`Test Failure: ${error}`);
1730
+ done(error);
1731
+ }
1732
+ }).timeout(attemptTimeout);
1733
+ it('should error if - missing certificateId', (done) => {
1734
+ try {
1735
+ a.certificateGet(null, (data, error) => {
1736
+ try {
1737
+ const displayE = 'certificateId is required';
1738
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-certificateGet', displayE);
1739
+ done();
1740
+ } catch (err) {
1741
+ log.error(`Test Failure: ${err}`);
1742
+ done(err);
1743
+ }
1744
+ });
1745
+ } catch (error) {
1746
+ log.error(`Adapter Exception: ${error}`);
1747
+ done(error);
1748
+ }
1749
+ }).timeout(attemptTimeout);
1750
+ });
1751
+
1752
+ describe('#certificateActionRetrieve - errors', () => {
1753
+ it('should have a certificateActionRetrieve function', (done) => {
1754
+ try {
1755
+ assert.equal(true, typeof a.certificateActionRetrieve === 'function');
1756
+ done();
1757
+ } catch (error) {
1758
+ log.error(`Test Failure: ${error}`);
1759
+ done(error);
1760
+ }
1761
+ }).timeout(attemptTimeout);
1762
+ it('should error if - missing certificateId', (done) => {
1763
+ try {
1764
+ a.certificateActionRetrieve(null, (data, error) => {
1765
+ try {
1766
+ const displayE = 'certificateId is required';
1767
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-certificateActionRetrieve', displayE);
1768
+ done();
1769
+ } catch (err) {
1770
+ log.error(`Test Failure: ${err}`);
1771
+ done(err);
1772
+ }
1773
+ });
1774
+ } catch (error) {
1775
+ log.error(`Adapter Exception: ${error}`);
1776
+ done(error);
1777
+ }
1778
+ }).timeout(attemptTimeout);
1779
+ });
1780
+
1781
+ describe('#certificateResendEmail - errors', () => {
1782
+ it('should have a certificateResendEmail function', (done) => {
1783
+ try {
1784
+ assert.equal(true, typeof a.certificateResendEmail === 'function');
1785
+ done();
1786
+ } catch (error) {
1787
+ log.error(`Test Failure: ${error}`);
1788
+ done(error);
1789
+ }
1790
+ }).timeout(attemptTimeout);
1791
+ it('should error if - missing certificateId', (done) => {
1792
+ try {
1793
+ a.certificateResendEmail(null, null, (data, error) => {
1794
+ try {
1795
+ const displayE = 'certificateId is required';
1796
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-certificateResendEmail', displayE);
1797
+ done();
1798
+ } catch (err) {
1799
+ log.error(`Test Failure: ${err}`);
1800
+ done(err);
1801
+ }
1802
+ });
1803
+ } catch (error) {
1804
+ log.error(`Adapter Exception: ${error}`);
1805
+ done(error);
1806
+ }
1807
+ }).timeout(attemptTimeout);
1808
+ it('should error if - missing emailId', (done) => {
1809
+ try {
1810
+ a.certificateResendEmail('fakeparam', null, (data, error) => {
1811
+ try {
1812
+ const displayE = 'emailId is required';
1813
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-certificateResendEmail', displayE);
1814
+ done();
1815
+ } catch (err) {
1816
+ log.error(`Test Failure: ${err}`);
1817
+ done(err);
1818
+ }
1819
+ });
1820
+ } catch (error) {
1821
+ log.error(`Adapter Exception: ${error}`);
1822
+ done(error);
1823
+ }
1824
+ }).timeout(attemptTimeout);
1825
+ });
1826
+
1827
+ describe('#certificateAlternateEmailAddress - errors', () => {
1828
+ it('should have a certificateAlternateEmailAddress function', (done) => {
1829
+ try {
1830
+ assert.equal(true, typeof a.certificateAlternateEmailAddress === 'function');
1831
+ done();
1832
+ } catch (error) {
1833
+ log.error(`Test Failure: ${error}`);
1834
+ done(error);
1835
+ }
1836
+ }).timeout(attemptTimeout);
1837
+ it('should error if - missing certificateId', (done) => {
1838
+ try {
1839
+ a.certificateAlternateEmailAddress(null, null, (data, error) => {
1840
+ try {
1841
+ const displayE = 'certificateId is required';
1842
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-certificateAlternateEmailAddress', displayE);
1843
+ done();
1844
+ } catch (err) {
1845
+ log.error(`Test Failure: ${err}`);
1846
+ done(err);
1847
+ }
1848
+ });
1849
+ } catch (error) {
1850
+ log.error(`Adapter Exception: ${error}`);
1851
+ done(error);
1852
+ }
1853
+ }).timeout(attemptTimeout);
1854
+ it('should error if - missing emailAddress', (done) => {
1855
+ try {
1856
+ a.certificateAlternateEmailAddress('fakeparam', null, (data, error) => {
1857
+ try {
1858
+ const displayE = 'emailAddress is required';
1859
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-certificateAlternateEmailAddress', displayE);
1860
+ done();
1861
+ } catch (err) {
1862
+ log.error(`Test Failure: ${err}`);
1863
+ done(err);
1864
+ }
1865
+ });
1866
+ } catch (error) {
1867
+ log.error(`Adapter Exception: ${error}`);
1868
+ done(error);
1869
+ }
1870
+ }).timeout(attemptTimeout);
1871
+ });
1872
+
1873
+ describe('#certificateResendEmailAddress - errors', () => {
1874
+ it('should have a certificateResendEmailAddress function', (done) => {
1875
+ try {
1876
+ assert.equal(true, typeof a.certificateResendEmailAddress === 'function');
1877
+ done();
1878
+ } catch (error) {
1879
+ log.error(`Test Failure: ${error}`);
1880
+ done(error);
1881
+ }
1882
+ }).timeout(attemptTimeout);
1883
+ it('should error if - missing certificateId', (done) => {
1884
+ try {
1885
+ a.certificateResendEmailAddress(null, null, null, (data, error) => {
1886
+ try {
1887
+ const displayE = 'certificateId is required';
1888
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-certificateResendEmailAddress', displayE);
1889
+ done();
1890
+ } catch (err) {
1891
+ log.error(`Test Failure: ${err}`);
1892
+ done(err);
1893
+ }
1894
+ });
1895
+ } catch (error) {
1896
+ log.error(`Adapter Exception: ${error}`);
1897
+ done(error);
1898
+ }
1899
+ }).timeout(attemptTimeout);
1900
+ it('should error if - missing emailId', (done) => {
1901
+ try {
1902
+ a.certificateResendEmailAddress('fakeparam', null, null, (data, error) => {
1903
+ try {
1904
+ const displayE = 'emailId is required';
1905
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-certificateResendEmailAddress', displayE);
1906
+ done();
1907
+ } catch (err) {
1908
+ log.error(`Test Failure: ${err}`);
1909
+ done(err);
1910
+ }
1911
+ });
1912
+ } catch (error) {
1913
+ log.error(`Adapter Exception: ${error}`);
1914
+ done(error);
1915
+ }
1916
+ }).timeout(attemptTimeout);
1917
+ it('should error if - missing emailAddress', (done) => {
1918
+ try {
1919
+ a.certificateResendEmailAddress('fakeparam', 'fakeparam', null, (data, error) => {
1920
+ try {
1921
+ const displayE = 'emailAddress is required';
1922
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-certificateResendEmailAddress', displayE);
1923
+ done();
1924
+ } catch (err) {
1925
+ log.error(`Test Failure: ${err}`);
1926
+ done(err);
1927
+ }
1928
+ });
1929
+ } catch (error) {
1930
+ log.error(`Adapter Exception: ${error}`);
1931
+ done(error);
1932
+ }
1933
+ }).timeout(attemptTimeout);
1934
+ });
1935
+
1936
+ describe('#certificateEmailHistory - errors', () => {
1937
+ it('should have a certificateEmailHistory function', (done) => {
1938
+ try {
1939
+ assert.equal(true, typeof a.certificateEmailHistory === 'function');
1940
+ done();
1941
+ } catch (error) {
1942
+ log.error(`Test Failure: ${error}`);
1943
+ done(error);
1944
+ }
1945
+ }).timeout(attemptTimeout);
1946
+ it('should error if - missing certificateId', (done) => {
1947
+ try {
1948
+ a.certificateEmailHistory(null, (data, error) => {
1949
+ try {
1950
+ const displayE = 'certificateId is required';
1951
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-certificateEmailHistory', displayE);
1952
+ done();
1953
+ } catch (err) {
1954
+ log.error(`Test Failure: ${err}`);
1955
+ done(err);
1956
+ }
1957
+ });
1958
+ } catch (error) {
1959
+ log.error(`Adapter Exception: ${error}`);
1960
+ done(error);
1961
+ }
1962
+ }).timeout(attemptTimeout);
1963
+ });
1964
+
1965
+ describe('#certificateCallbackDelete - errors', () => {
1966
+ it('should have a certificateCallbackDelete function', (done) => {
1967
+ try {
1968
+ assert.equal(true, typeof a.certificateCallbackDelete === 'function');
1969
+ done();
1970
+ } catch (error) {
1971
+ log.error(`Test Failure: ${error}`);
1972
+ done(error);
1973
+ }
1974
+ }).timeout(attemptTimeout);
1975
+ it('should error if - missing certificateId', (done) => {
1976
+ try {
1977
+ a.certificateCallbackDelete(null, (data, error) => {
1978
+ try {
1979
+ const displayE = 'certificateId is required';
1980
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-certificateCallbackDelete', displayE);
1981
+ done();
1982
+ } catch (err) {
1983
+ log.error(`Test Failure: ${err}`);
1984
+ done(err);
1985
+ }
1986
+ });
1987
+ } catch (error) {
1988
+ log.error(`Adapter Exception: ${error}`);
1989
+ done(error);
1990
+ }
1991
+ }).timeout(attemptTimeout);
1992
+ });
1993
+
1994
+ describe('#certificateCallbackGet - errors', () => {
1995
+ it('should have a certificateCallbackGet function', (done) => {
1996
+ try {
1997
+ assert.equal(true, typeof a.certificateCallbackGet === 'function');
1998
+ done();
1999
+ } catch (error) {
2000
+ log.error(`Test Failure: ${error}`);
2001
+ done(error);
2002
+ }
2003
+ }).timeout(attemptTimeout);
2004
+ it('should error if - missing certificateId', (done) => {
2005
+ try {
2006
+ a.certificateCallbackGet(null, (data, error) => {
2007
+ try {
2008
+ const displayE = 'certificateId is required';
2009
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-certificateCallbackGet', displayE);
2010
+ done();
2011
+ } catch (err) {
2012
+ log.error(`Test Failure: ${err}`);
2013
+ done(err);
2014
+ }
2015
+ });
2016
+ } catch (error) {
2017
+ log.error(`Adapter Exception: ${error}`);
2018
+ done(error);
2019
+ }
2020
+ }).timeout(attemptTimeout);
2021
+ });
2022
+
2023
+ describe('#certificateCallbackReplace - errors', () => {
2024
+ it('should have a certificateCallbackReplace function', (done) => {
2025
+ try {
2026
+ assert.equal(true, typeof a.certificateCallbackReplace === 'function');
2027
+ done();
2028
+ } catch (error) {
2029
+ log.error(`Test Failure: ${error}`);
2030
+ done(error);
2031
+ }
2032
+ }).timeout(attemptTimeout);
2033
+ it('should error if - missing certificateId', (done) => {
2034
+ try {
2035
+ a.certificateCallbackReplace(null, null, (data, error) => {
2036
+ try {
2037
+ const displayE = 'certificateId is required';
2038
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-certificateCallbackReplace', displayE);
2039
+ done();
2040
+ } catch (err) {
2041
+ log.error(`Test Failure: ${err}`);
2042
+ done(err);
2043
+ }
2044
+ });
2045
+ } catch (error) {
2046
+ log.error(`Adapter Exception: ${error}`);
2047
+ done(error);
2048
+ }
2049
+ }).timeout(attemptTimeout);
2050
+ it('should error if - missing callbackUrl', (done) => {
2051
+ try {
2052
+ a.certificateCallbackReplace('fakeparam', null, (data, error) => {
2053
+ try {
2054
+ const displayE = 'callbackUrl is required';
2055
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-certificateCallbackReplace', displayE);
2056
+ done();
2057
+ } catch (err) {
2058
+ log.error(`Test Failure: ${err}`);
2059
+ done(err);
2060
+ }
2061
+ });
2062
+ } catch (error) {
2063
+ log.error(`Adapter Exception: ${error}`);
2064
+ done(error);
2065
+ }
2066
+ }).timeout(attemptTimeout);
2067
+ });
2068
+
2069
+ describe('#certificateCancel - errors', () => {
2070
+ it('should have a certificateCancel function', (done) => {
2071
+ try {
2072
+ assert.equal(true, typeof a.certificateCancel === 'function');
2073
+ done();
2074
+ } catch (error) {
2075
+ log.error(`Test Failure: ${error}`);
2076
+ done(error);
2077
+ }
2078
+ }).timeout(attemptTimeout);
2079
+ it('should error if - missing certificateId', (done) => {
2080
+ try {
2081
+ a.certificateCancel(null, (data, error) => {
2082
+ try {
2083
+ const displayE = 'certificateId is required';
2084
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-certificateCancel', displayE);
2085
+ done();
2086
+ } catch (err) {
2087
+ log.error(`Test Failure: ${err}`);
2088
+ done(err);
2089
+ }
2090
+ });
2091
+ } catch (error) {
2092
+ log.error(`Adapter Exception: ${error}`);
2093
+ done(error);
2094
+ }
2095
+ }).timeout(attemptTimeout);
2096
+ });
2097
+
2098
+ describe('#certificateDownload - errors', () => {
2099
+ it('should have a certificateDownload function', (done) => {
2100
+ try {
2101
+ assert.equal(true, typeof a.certificateDownload === 'function');
2102
+ done();
2103
+ } catch (error) {
2104
+ log.error(`Test Failure: ${error}`);
2105
+ done(error);
2106
+ }
2107
+ }).timeout(attemptTimeout);
2108
+ it('should error if - missing certificateId', (done) => {
2109
+ try {
2110
+ a.certificateDownload(null, (data, error) => {
2111
+ try {
2112
+ const displayE = 'certificateId is required';
2113
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-certificateDownload', displayE);
2114
+ done();
2115
+ } catch (err) {
2116
+ log.error(`Test Failure: ${err}`);
2117
+ done(err);
2118
+ }
2119
+ });
2120
+ } catch (error) {
2121
+ log.error(`Adapter Exception: ${error}`);
2122
+ done(error);
2123
+ }
2124
+ }).timeout(attemptTimeout);
2125
+ });
2126
+
2127
+ describe('#certificateReissue - errors', () => {
2128
+ it('should have a certificateReissue function', (done) => {
2129
+ try {
2130
+ assert.equal(true, typeof a.certificateReissue === 'function');
2131
+ done();
2132
+ } catch (error) {
2133
+ log.error(`Test Failure: ${error}`);
2134
+ done(error);
2135
+ }
2136
+ }).timeout(attemptTimeout);
2137
+ it('should error if - missing certificateId', (done) => {
2138
+ try {
2139
+ a.certificateReissue(null, null, (data, error) => {
2140
+ try {
2141
+ const displayE = 'certificateId is required';
2142
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-certificateReissue', displayE);
2143
+ done();
2144
+ } catch (err) {
2145
+ log.error(`Test Failure: ${err}`);
2146
+ done(err);
2147
+ }
2148
+ });
2149
+ } catch (error) {
2150
+ log.error(`Adapter Exception: ${error}`);
2151
+ done(error);
2152
+ }
2153
+ }).timeout(attemptTimeout);
2154
+ it('should error if - missing reissueCreate', (done) => {
2155
+ try {
2156
+ a.certificateReissue('fakeparam', null, (data, error) => {
2157
+ try {
2158
+ const displayE = 'reissueCreate is required';
2159
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-certificateReissue', displayE);
2160
+ done();
2161
+ } catch (err) {
2162
+ log.error(`Test Failure: ${err}`);
2163
+ done(err);
2164
+ }
2165
+ });
2166
+ } catch (error) {
2167
+ log.error(`Adapter Exception: ${error}`);
2168
+ done(error);
2169
+ }
2170
+ }).timeout(attemptTimeout);
2171
+ });
2172
+
2173
+ describe('#certificateRenew - errors', () => {
2174
+ it('should have a certificateRenew function', (done) => {
2175
+ try {
2176
+ assert.equal(true, typeof a.certificateRenew === 'function');
2177
+ done();
2178
+ } catch (error) {
2179
+ log.error(`Test Failure: ${error}`);
2180
+ done(error);
2181
+ }
2182
+ }).timeout(attemptTimeout);
2183
+ it('should error if - missing certificateId', (done) => {
2184
+ try {
2185
+ a.certificateRenew(null, null, (data, error) => {
2186
+ try {
2187
+ const displayE = 'certificateId is required';
2188
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-certificateRenew', displayE);
2189
+ done();
2190
+ } catch (err) {
2191
+ log.error(`Test Failure: ${err}`);
2192
+ done(err);
2193
+ }
2194
+ });
2195
+ } catch (error) {
2196
+ log.error(`Adapter Exception: ${error}`);
2197
+ done(error);
2198
+ }
2199
+ }).timeout(attemptTimeout);
2200
+ it('should error if - missing renewCreate', (done) => {
2201
+ try {
2202
+ a.certificateRenew('fakeparam', null, (data, error) => {
2203
+ try {
2204
+ const displayE = 'renewCreate is required';
2205
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-certificateRenew', displayE);
2206
+ done();
2207
+ } catch (err) {
2208
+ log.error(`Test Failure: ${err}`);
2209
+ done(err);
2210
+ }
2211
+ });
2212
+ } catch (error) {
2213
+ log.error(`Adapter Exception: ${error}`);
2214
+ done(error);
2215
+ }
2216
+ }).timeout(attemptTimeout);
2217
+ });
2218
+
2219
+ describe('#certificateRevoke - errors', () => {
2220
+ it('should have a certificateRevoke function', (done) => {
2221
+ try {
2222
+ assert.equal(true, typeof a.certificateRevoke === 'function');
2223
+ done();
2224
+ } catch (error) {
2225
+ log.error(`Test Failure: ${error}`);
2226
+ done(error);
2227
+ }
2228
+ }).timeout(attemptTimeout);
2229
+ it('should error if - missing certificateId', (done) => {
2230
+ try {
2231
+ a.certificateRevoke(null, null, (data, error) => {
2232
+ try {
2233
+ const displayE = 'certificateId is required';
2234
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-certificateRevoke', displayE);
2235
+ done();
2236
+ } catch (err) {
2237
+ log.error(`Test Failure: ${err}`);
2238
+ done(err);
2239
+ }
2240
+ });
2241
+ } catch (error) {
2242
+ log.error(`Adapter Exception: ${error}`);
2243
+ done(error);
2244
+ }
2245
+ }).timeout(attemptTimeout);
2246
+ it('should error if - missing certificateRevoke', (done) => {
2247
+ try {
2248
+ a.certificateRevoke('fakeparam', null, (data, error) => {
2249
+ try {
2250
+ const displayE = 'certificateRevoke is required';
2251
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-certificateRevoke', displayE);
2252
+ done();
2253
+ } catch (err) {
2254
+ log.error(`Test Failure: ${err}`);
2255
+ done(err);
2256
+ }
2257
+ });
2258
+ } catch (error) {
2259
+ log.error(`Adapter Exception: ${error}`);
2260
+ done(error);
2261
+ }
2262
+ }).timeout(attemptTimeout);
2263
+ });
2264
+
2265
+ describe('#certificateSitesealGet - errors', () => {
2266
+ it('should have a certificateSitesealGet function', (done) => {
2267
+ try {
2268
+ assert.equal(true, typeof a.certificateSitesealGet === 'function');
2269
+ done();
2270
+ } catch (error) {
2271
+ log.error(`Test Failure: ${error}`);
2272
+ done(error);
2273
+ }
2274
+ }).timeout(attemptTimeout);
2275
+ it('should error if - missing certificateId', (done) => {
2276
+ try {
2277
+ a.certificateSitesealGet(null, null, null, (data, error) => {
2278
+ try {
2279
+ const displayE = 'certificateId is required';
2280
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-certificateSitesealGet', displayE);
2281
+ done();
2282
+ } catch (err) {
2283
+ log.error(`Test Failure: ${err}`);
2284
+ done(err);
2285
+ }
2286
+ });
2287
+ } catch (error) {
2288
+ log.error(`Adapter Exception: ${error}`);
2289
+ done(error);
2290
+ }
2291
+ }).timeout(attemptTimeout);
2292
+ });
2293
+
2294
+ describe('#certificateVerifydomaincontrol - errors', () => {
2295
+ it('should have a certificateVerifydomaincontrol function', (done) => {
2296
+ try {
2297
+ assert.equal(true, typeof a.certificateVerifydomaincontrol === 'function');
2298
+ done();
2299
+ } catch (error) {
2300
+ log.error(`Test Failure: ${error}`);
2301
+ done(error);
2302
+ }
2303
+ }).timeout(attemptTimeout);
2304
+ it('should error if - missing certificateId', (done) => {
2305
+ try {
2306
+ a.certificateVerifydomaincontrol(null, (data, error) => {
2307
+ try {
2308
+ const displayE = 'certificateId is required';
2309
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-certificateVerifydomaincontrol', displayE);
2310
+ done();
2311
+ } catch (err) {
2312
+ log.error(`Test Failure: ${err}`);
2313
+ done(err);
2314
+ }
2315
+ });
2316
+ } catch (error) {
2317
+ log.error(`Adapter Exception: ${error}`);
2318
+ done(error);
2319
+ }
2320
+ }).timeout(attemptTimeout);
2321
+ });
2322
+
2323
+ describe('#certificateGetEntitlement - errors', () => {
2324
+ it('should have a certificateGetEntitlement function', (done) => {
2325
+ try {
2326
+ assert.equal(true, typeof a.certificateGetEntitlement === 'function');
2327
+ done();
2328
+ } catch (error) {
2329
+ log.error(`Test Failure: ${error}`);
2330
+ done(error);
2331
+ }
2332
+ }).timeout(attemptTimeout);
2333
+ it('should error if - missing entitlementId', (done) => {
2334
+ try {
2335
+ a.certificateGetEntitlement(null, null, (data, error) => {
2336
+ try {
2337
+ const displayE = 'entitlementId is required';
2338
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-certificateGetEntitlement', displayE);
2339
+ done();
2340
+ } catch (err) {
2341
+ log.error(`Test Failure: ${err}`);
2342
+ done(err);
2343
+ }
2344
+ });
2345
+ } catch (error) {
2346
+ log.error(`Adapter Exception: ${error}`);
2347
+ done(error);
2348
+ }
2349
+ }).timeout(attemptTimeout);
2350
+ });
2351
+
2352
+ describe('#certificateDownloadEntitlement - errors', () => {
2353
+ it('should have a certificateDownloadEntitlement function', (done) => {
2354
+ try {
2355
+ assert.equal(true, typeof a.certificateDownloadEntitlement === 'function');
2356
+ done();
2357
+ } catch (error) {
2358
+ log.error(`Test Failure: ${error}`);
2359
+ done(error);
2360
+ }
2361
+ }).timeout(attemptTimeout);
2362
+ it('should error if - missing entitlementId', (done) => {
2363
+ try {
2364
+ a.certificateDownloadEntitlement(null, (data, error) => {
2365
+ try {
2366
+ const displayE = 'entitlementId is required';
2367
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-certificateDownloadEntitlement', displayE);
2368
+ done();
2369
+ } catch (err) {
2370
+ log.error(`Test Failure: ${err}`);
2371
+ done(err);
2372
+ }
2373
+ });
2374
+ } catch (error) {
2375
+ log.error(`Adapter Exception: ${error}`);
2376
+ done(error);
2377
+ }
2378
+ }).timeout(attemptTimeout);
2379
+ });
2380
+
2381
+ describe('#getCustomerCertificatesByCustomerId - errors', () => {
2382
+ it('should have a getCustomerCertificatesByCustomerId function', (done) => {
2383
+ try {
2384
+ assert.equal(true, typeof a.getCustomerCertificatesByCustomerId === 'function');
2385
+ done();
2386
+ } catch (error) {
2387
+ log.error(`Test Failure: ${error}`);
2388
+ done(error);
2389
+ }
2390
+ }).timeout(attemptTimeout);
2391
+ it('should error if - missing customerId', (done) => {
2392
+ try {
2393
+ a.getCustomerCertificatesByCustomerId(null, null, null, (data, error) => {
2394
+ try {
2395
+ const displayE = 'customerId is required';
2396
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getCustomerCertificatesByCustomerId', displayE);
2397
+ done();
2398
+ } catch (err) {
2399
+ log.error(`Test Failure: ${err}`);
2400
+ done(err);
2401
+ }
2402
+ });
2403
+ } catch (error) {
2404
+ log.error(`Adapter Exception: ${error}`);
2405
+ done(error);
2406
+ }
2407
+ }).timeout(attemptTimeout);
2408
+ });
2409
+
2410
+ describe('#getCertificateDetailByCertIdentifier - errors', () => {
2411
+ it('should have a getCertificateDetailByCertIdentifier function', (done) => {
2412
+ try {
2413
+ assert.equal(true, typeof a.getCertificateDetailByCertIdentifier === 'function');
2414
+ done();
2415
+ } catch (error) {
2416
+ log.error(`Test Failure: ${error}`);
2417
+ done(error);
2418
+ }
2419
+ }).timeout(attemptTimeout);
2420
+ it('should error if - missing customerId', (done) => {
2421
+ try {
2422
+ a.getCertificateDetailByCertIdentifier(null, null, (data, error) => {
2423
+ try {
2424
+ const displayE = 'customerId is required';
2425
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getCertificateDetailByCertIdentifier', displayE);
2426
+ done();
2427
+ } catch (err) {
2428
+ log.error(`Test Failure: ${err}`);
2429
+ done(err);
2430
+ }
2431
+ });
2432
+ } catch (error) {
2433
+ log.error(`Adapter Exception: ${error}`);
2434
+ done(error);
2435
+ }
2436
+ }).timeout(attemptTimeout);
2437
+ it('should error if - missing certificateId', (done) => {
2438
+ try {
2439
+ a.getCertificateDetailByCertIdentifier('fakeparam', null, (data, error) => {
2440
+ try {
2441
+ const displayE = 'certificateId is required';
2442
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getCertificateDetailByCertIdentifier', displayE);
2443
+ done();
2444
+ } catch (err) {
2445
+ log.error(`Test Failure: ${err}`);
2446
+ done(err);
2447
+ }
2448
+ });
2449
+ } catch (error) {
2450
+ log.error(`Adapter Exception: ${error}`);
2451
+ done(error);
2452
+ }
2453
+ }).timeout(attemptTimeout);
2454
+ });
2455
+
2456
+ describe('#getDomainInformationByCertificateId - errors', () => {
2457
+ it('should have a getDomainInformationByCertificateId function', (done) => {
2458
+ try {
2459
+ assert.equal(true, typeof a.getDomainInformationByCertificateId === 'function');
2460
+ done();
2461
+ } catch (error) {
2462
+ log.error(`Test Failure: ${error}`);
2463
+ done(error);
2464
+ }
2465
+ }).timeout(attemptTimeout);
2466
+ it('should error if - missing customerId', (done) => {
2467
+ try {
2468
+ a.getDomainInformationByCertificateId(null, null, (data, error) => {
2469
+ try {
2470
+ const displayE = 'customerId is required';
2471
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getDomainInformationByCertificateId', displayE);
2472
+ done();
2473
+ } catch (err) {
2474
+ log.error(`Test Failure: ${err}`);
2475
+ done(err);
2476
+ }
2477
+ });
2478
+ } catch (error) {
2479
+ log.error(`Adapter Exception: ${error}`);
2480
+ done(error);
2481
+ }
2482
+ }).timeout(attemptTimeout);
2483
+ it('should error if - missing certificateId', (done) => {
2484
+ try {
2485
+ a.getDomainInformationByCertificateId('fakeparam', null, (data, error) => {
2486
+ try {
2487
+ const displayE = 'certificateId is required';
2488
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getDomainInformationByCertificateId', displayE);
2489
+ done();
2490
+ } catch (err) {
2491
+ log.error(`Test Failure: ${err}`);
2492
+ done(err);
2493
+ }
2494
+ });
2495
+ } catch (error) {
2496
+ log.error(`Adapter Exception: ${error}`);
2497
+ done(error);
2498
+ }
2499
+ }).timeout(attemptTimeout);
2500
+ });
2501
+
2502
+ describe('#getDomainDetailsByDomain - errors', () => {
2503
+ it('should have a getDomainDetailsByDomain function', (done) => {
2504
+ try {
2505
+ assert.equal(true, typeof a.getDomainDetailsByDomain === 'function');
2506
+ done();
2507
+ } catch (error) {
2508
+ log.error(`Test Failure: ${error}`);
2509
+ done(error);
2510
+ }
2511
+ }).timeout(attemptTimeout);
2512
+ it('should error if - missing customerId', (done) => {
2513
+ try {
2514
+ a.getDomainDetailsByDomain(null, null, null, (data, error) => {
2515
+ try {
2516
+ const displayE = 'customerId is required';
2517
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getDomainDetailsByDomain', displayE);
2518
+ done();
2519
+ } catch (err) {
2520
+ log.error(`Test Failure: ${err}`);
2521
+ done(err);
2522
+ }
2523
+ });
2524
+ } catch (error) {
2525
+ log.error(`Adapter Exception: ${error}`);
2526
+ done(error);
2527
+ }
2528
+ }).timeout(attemptTimeout);
2529
+ it('should error if - missing certificateId', (done) => {
2530
+ try {
2531
+ a.getDomainDetailsByDomain('fakeparam', null, null, (data, error) => {
2532
+ try {
2533
+ const displayE = 'certificateId is required';
2534
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getDomainDetailsByDomain', displayE);
2535
+ done();
2536
+ } catch (err) {
2537
+ log.error(`Test Failure: ${err}`);
2538
+ done(err);
2539
+ }
2540
+ });
2541
+ } catch (error) {
2542
+ log.error(`Adapter Exception: ${error}`);
2543
+ done(error);
2544
+ }
2545
+ }).timeout(attemptTimeout);
2546
+ it('should error if - missing domain', (done) => {
2547
+ try {
2548
+ a.getDomainDetailsByDomain('fakeparam', 'fakeparam', null, (data, error) => {
2549
+ try {
2550
+ const displayE = 'domain is required';
2551
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getDomainDetailsByDomain', displayE);
2552
+ done();
2553
+ } catch (err) {
2554
+ log.error(`Test Failure: ${err}`);
2555
+ done(err);
2556
+ }
2557
+ });
2558
+ } catch (error) {
2559
+ log.error(`Adapter Exception: ${error}`);
2560
+ done(error);
2561
+ }
2562
+ }).timeout(attemptTimeout);
2563
+ });
2564
+
2565
+ describe('#getAcmeExternalAccountBinding - errors', () => {
2566
+ it('should have a getAcmeExternalAccountBinding function', (done) => {
2567
+ try {
2568
+ assert.equal(true, typeof a.getAcmeExternalAccountBinding === 'function');
2569
+ done();
2570
+ } catch (error) {
2571
+ log.error(`Test Failure: ${error}`);
2572
+ done(error);
2573
+ }
2574
+ }).timeout(attemptTimeout);
2575
+ it('should error if - missing customerId', (done) => {
2576
+ try {
2577
+ a.getAcmeExternalAccountBinding(null, (data, error) => {
2578
+ try {
2579
+ const displayE = 'customerId is required';
2580
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getAcmeExternalAccountBinding', displayE);
2581
+ done();
2582
+ } catch (err) {
2583
+ log.error(`Test Failure: ${err}`);
2584
+ done(err);
2585
+ }
2586
+ });
2587
+ } catch (error) {
2588
+ log.error(`Adapter Exception: ${error}`);
2589
+ done(error);
2590
+ }
2591
+ }).timeout(attemptTimeout);
2592
+ });
2593
+
2594
+ describe('#getCountries - errors', () => {
2595
+ it('should have a getCountries function', (done) => {
2596
+ try {
2597
+ assert.equal(true, typeof a.getCountries === 'function');
2598
+ done();
2599
+ } catch (error) {
2600
+ log.error(`Test Failure: ${error}`);
2601
+ done(error);
2602
+ }
2603
+ }).timeout(attemptTimeout);
2604
+ it('should error if - missing marketId', (done) => {
2605
+ try {
2606
+ a.getCountries(null, null, null, null, null, (data, error) => {
2607
+ try {
2608
+ const displayE = 'marketId is required';
2609
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getCountries', displayE);
2610
+ done();
2611
+ } catch (err) {
2612
+ log.error(`Test Failure: ${err}`);
2613
+ done(err);
2614
+ }
2615
+ });
2616
+ } catch (error) {
2617
+ log.error(`Adapter Exception: ${error}`);
2618
+ done(error);
2619
+ }
2620
+ }).timeout(attemptTimeout);
2621
+ });
2622
+
2623
+ describe('#getCountry - errors', () => {
2624
+ it('should have a getCountry function', (done) => {
2625
+ try {
2626
+ assert.equal(true, typeof a.getCountry === 'function');
2627
+ done();
2628
+ } catch (error) {
2629
+ log.error(`Test Failure: ${error}`);
2630
+ done(error);
2631
+ }
2632
+ }).timeout(attemptTimeout);
2633
+ it('should error if - missing countryKey', (done) => {
2634
+ try {
2635
+ a.getCountry(null, null, null, null, (data, error) => {
2636
+ try {
2637
+ const displayE = 'countryKey is required';
2638
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getCountry', displayE);
2639
+ done();
2640
+ } catch (err) {
2641
+ log.error(`Test Failure: ${err}`);
2642
+ done(err);
2643
+ }
2644
+ });
2645
+ } catch (error) {
2646
+ log.error(`Adapter Exception: ${error}`);
2647
+ done(error);
2648
+ }
2649
+ }).timeout(attemptTimeout);
2650
+ it('should error if - missing marketId', (done) => {
2651
+ try {
2652
+ a.getCountry('fakeparam', null, null, null, (data, error) => {
2653
+ try {
2654
+ const displayE = 'marketId is required';
2655
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getCountry', displayE);
2656
+ done();
2657
+ } catch (err) {
2658
+ log.error(`Test Failure: ${err}`);
2659
+ done(err);
2660
+ }
2661
+ });
2662
+ } catch (error) {
2663
+ log.error(`Adapter Exception: ${error}`);
2664
+ done(error);
2665
+ }
2666
+ }).timeout(attemptTimeout);
2667
+ });
2668
+
2669
+ describe('#listDomains - errors', () => {
2670
+ it('should have a listDomains function', (done) => {
2671
+ try {
2672
+ assert.equal(true, typeof a.listDomains === 'function');
2673
+ done();
2674
+ } catch (error) {
2675
+ log.error(`Test Failure: ${error}`);
2676
+ done(error);
2677
+ }
2678
+ }).timeout(attemptTimeout);
2679
+ });
2680
+
2681
+ describe('#getAgreement - errors', () => {
2682
+ it('should have a getAgreement function', (done) => {
2683
+ try {
2684
+ assert.equal(true, typeof a.getAgreement === 'function');
2685
+ done();
2686
+ } catch (error) {
2687
+ log.error(`Test Failure: ${error}`);
2688
+ done(error);
2689
+ }
2690
+ }).timeout(attemptTimeout);
2691
+ it('should error if - missing tlds', (done) => {
2692
+ try {
2693
+ a.getAgreement(null, null, null, (data, error) => {
2694
+ try {
2695
+ const displayE = 'tlds is required';
2696
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getAgreement', displayE);
2697
+ done();
2698
+ } catch (err) {
2699
+ log.error(`Test Failure: ${err}`);
2700
+ done(err);
2701
+ }
2702
+ });
2703
+ } catch (error) {
2704
+ log.error(`Adapter Exception: ${error}`);
2705
+ done(error);
2706
+ }
2707
+ }).timeout(attemptTimeout);
2708
+ it('should error if - missing privacy', (done) => {
2709
+ try {
2710
+ a.getAgreement('fakeparam', null, null, (data, error) => {
2711
+ try {
2712
+ const displayE = 'privacy is required';
2713
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getAgreement', displayE);
2714
+ done();
2715
+ } catch (err) {
2716
+ log.error(`Test Failure: ${err}`);
2717
+ done(err);
2718
+ }
2719
+ });
2720
+ } catch (error) {
2721
+ log.error(`Adapter Exception: ${error}`);
2722
+ done(error);
2723
+ }
2724
+ }).timeout(attemptTimeout);
2725
+ });
2726
+
2727
+ describe('#available - errors', () => {
2728
+ it('should have a available function', (done) => {
2729
+ try {
2730
+ assert.equal(true, typeof a.available === 'function');
2731
+ done();
2732
+ } catch (error) {
2733
+ log.error(`Test Failure: ${error}`);
2734
+ done(error);
2735
+ }
2736
+ }).timeout(attemptTimeout);
2737
+ it('should error if - missing domain', (done) => {
2738
+ try {
2739
+ a.available(null, null, null, (data, error) => {
2740
+ try {
2741
+ const displayE = 'domain is required';
2742
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-available', displayE);
2743
+ done();
2744
+ } catch (err) {
2745
+ log.error(`Test Failure: ${err}`);
2746
+ done(err);
2747
+ }
2748
+ });
2749
+ } catch (error) {
2750
+ log.error(`Adapter Exception: ${error}`);
2751
+ done(error);
2752
+ }
2753
+ }).timeout(attemptTimeout);
2754
+ });
2755
+
2756
+ describe('#availableBulk - errors', () => {
2757
+ it('should have a availableBulk function', (done) => {
2758
+ try {
2759
+ assert.equal(true, typeof a.availableBulk === 'function');
2760
+ done();
2761
+ } catch (error) {
2762
+ log.error(`Test Failure: ${error}`);
2763
+ done(error);
2764
+ }
2765
+ }).timeout(attemptTimeout);
2766
+ it('should error if - missing domains', (done) => {
2767
+ try {
2768
+ a.availableBulk(null, null, (data, error) => {
2769
+ try {
2770
+ const displayE = 'domains is required';
2771
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-availableBulk', displayE);
2772
+ done();
2773
+ } catch (err) {
2774
+ log.error(`Test Failure: ${err}`);
2775
+ done(err);
2776
+ }
2777
+ });
2778
+ } catch (error) {
2779
+ log.error(`Adapter Exception: ${error}`);
2780
+ done(error);
2781
+ }
2782
+ }).timeout(attemptTimeout);
2783
+ });
2784
+
2785
+ describe('#contactsValidate - errors', () => {
2786
+ it('should have a contactsValidate function', (done) => {
2787
+ try {
2788
+ assert.equal(true, typeof a.contactsValidate === 'function');
2789
+ done();
2790
+ } catch (error) {
2791
+ log.error(`Test Failure: ${error}`);
2792
+ done(error);
2793
+ }
2794
+ }).timeout(attemptTimeout);
2795
+ it('should error if - missing body', (done) => {
2796
+ try {
2797
+ a.contactsValidate('fakeparam', null, (data, error) => {
2798
+ try {
2799
+ const displayE = 'body is required';
2800
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-contactsValidate', displayE);
2801
+ done();
2802
+ } catch (err) {
2803
+ log.error(`Test Failure: ${err}`);
2804
+ done(err);
2805
+ }
2806
+ });
2807
+ } catch (error) {
2808
+ log.error(`Adapter Exception: ${error}`);
2809
+ done(error);
2810
+ }
2811
+ }).timeout(attemptTimeout);
2812
+ });
2813
+
2814
+ describe('#purchase - errors', () => {
2815
+ it('should have a purchase function', (done) => {
2816
+ try {
2817
+ assert.equal(true, typeof a.purchase === 'function');
2818
+ done();
2819
+ } catch (error) {
2820
+ log.error(`Test Failure: ${error}`);
2821
+ done(error);
2822
+ }
2823
+ }).timeout(attemptTimeout);
2824
+ it('should error if - missing body', (done) => {
2825
+ try {
2826
+ a.purchase(null, (data, error) => {
2827
+ try {
2828
+ const displayE = 'body is required';
2829
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-purchase', displayE);
2830
+ done();
2831
+ } catch (err) {
2832
+ log.error(`Test Failure: ${err}`);
2833
+ done(err);
2834
+ }
2835
+ });
2836
+ } catch (error) {
2837
+ log.error(`Adapter Exception: ${error}`);
2838
+ done(error);
2839
+ }
2840
+ }).timeout(attemptTimeout);
2841
+ });
2842
+
2843
+ describe('#schema - errors', () => {
2844
+ it('should have a schema function', (done) => {
2845
+ try {
2846
+ assert.equal(true, typeof a.schema === 'function');
2847
+ done();
2848
+ } catch (error) {
2849
+ log.error(`Test Failure: ${error}`);
2850
+ done(error);
2851
+ }
2852
+ }).timeout(attemptTimeout);
2853
+ it('should error if - missing tld', (done) => {
2854
+ try {
2855
+ a.schema(null, (data, error) => {
2856
+ try {
2857
+ const displayE = 'tld is required';
2858
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-schema', displayE);
2859
+ done();
2860
+ } catch (err) {
2861
+ log.error(`Test Failure: ${err}`);
2862
+ done(err);
2863
+ }
2864
+ });
2865
+ } catch (error) {
2866
+ log.error(`Adapter Exception: ${error}`);
2867
+ done(error);
2868
+ }
2869
+ }).timeout(attemptTimeout);
2870
+ });
2871
+
2872
+ describe('#validate - errors', () => {
2873
+ it('should have a validate function', (done) => {
2874
+ try {
2875
+ assert.equal(true, typeof a.validate === 'function');
2876
+ done();
2877
+ } catch (error) {
2878
+ log.error(`Test Failure: ${error}`);
2879
+ done(error);
2880
+ }
2881
+ }).timeout(attemptTimeout);
2882
+ it('should error if - missing body', (done) => {
2883
+ try {
2884
+ a.validate(null, (data, error) => {
2885
+ try {
2886
+ const displayE = 'body is required';
2887
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-validate', displayE);
2888
+ done();
2889
+ } catch (err) {
2890
+ log.error(`Test Failure: ${err}`);
2891
+ done(err);
2892
+ }
2893
+ });
2894
+ } catch (error) {
2895
+ log.error(`Adapter Exception: ${error}`);
2896
+ done(error);
2897
+ }
2898
+ }).timeout(attemptTimeout);
2899
+ });
2900
+
2901
+ describe('#suggest - errors', () => {
2902
+ it('should have a suggest function', (done) => {
2903
+ try {
2904
+ assert.equal(true, typeof a.suggest === 'function');
2905
+ done();
2906
+ } catch (error) {
2907
+ log.error(`Test Failure: ${error}`);
2908
+ done(error);
2909
+ }
2910
+ }).timeout(attemptTimeout);
2911
+ });
2912
+
2913
+ describe('#tlds - errors', () => {
2914
+ it('should have a tlds function', (done) => {
2915
+ try {
2916
+ assert.equal(true, typeof a.tlds === 'function');
2917
+ done();
2918
+ } catch (error) {
2919
+ log.error(`Test Failure: ${error}`);
2920
+ done(error);
2921
+ }
2922
+ }).timeout(attemptTimeout);
2923
+ });
2924
+
2925
+ describe('#cancel - errors', () => {
2926
+ it('should have a cancel function', (done) => {
2927
+ try {
2928
+ assert.equal(true, typeof a.cancel === 'function');
2929
+ done();
2930
+ } catch (error) {
2931
+ log.error(`Test Failure: ${error}`);
2932
+ done(error);
2933
+ }
2934
+ }).timeout(attemptTimeout);
2935
+ it('should error if - missing domain', (done) => {
2936
+ try {
2937
+ a.cancel(null, (data, error) => {
2938
+ try {
2939
+ const displayE = 'domain is required';
2940
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-cancel', displayE);
2941
+ done();
2942
+ } catch (err) {
2943
+ log.error(`Test Failure: ${err}`);
2944
+ done(err);
2945
+ }
2946
+ });
2947
+ } catch (error) {
2948
+ log.error(`Adapter Exception: ${error}`);
2949
+ done(error);
2950
+ }
2951
+ }).timeout(attemptTimeout);
2952
+ });
2953
+
2954
+ describe('#getDomain - errors', () => {
2955
+ it('should have a getDomain function', (done) => {
2956
+ try {
2957
+ assert.equal(true, typeof a.getDomain === 'function');
2958
+ done();
2959
+ } catch (error) {
2960
+ log.error(`Test Failure: ${error}`);
2961
+ done(error);
2962
+ }
2963
+ }).timeout(attemptTimeout);
2964
+ it('should error if - missing domain', (done) => {
2965
+ try {
2966
+ a.getDomain(null, (data, error) => {
2967
+ try {
2968
+ const displayE = 'domain is required';
2969
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getDomain', displayE);
2970
+ done();
2971
+ } catch (err) {
2972
+ log.error(`Test Failure: ${err}`);
2973
+ done(err);
2974
+ }
2975
+ });
2976
+ } catch (error) {
2977
+ log.error(`Adapter Exception: ${error}`);
2978
+ done(error);
2979
+ }
2980
+ }).timeout(attemptTimeout);
2981
+ });
2982
+
2983
+ describe('#update - errors', () => {
2984
+ it('should have a update function', (done) => {
2985
+ try {
2986
+ assert.equal(true, typeof a.update === 'function');
2987
+ done();
2988
+ } catch (error) {
2989
+ log.error(`Test Failure: ${error}`);
2990
+ done(error);
2991
+ }
2992
+ }).timeout(attemptTimeout);
2993
+ it('should error if - missing domain', (done) => {
2994
+ try {
2995
+ a.update(null, null, (data, error) => {
2996
+ try {
2997
+ const displayE = 'domain is required';
2998
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-update', displayE);
2999
+ done();
3000
+ } catch (err) {
3001
+ log.error(`Test Failure: ${err}`);
3002
+ done(err);
3003
+ }
3004
+ });
3005
+ } catch (error) {
3006
+ log.error(`Adapter Exception: ${error}`);
3007
+ done(error);
3008
+ }
3009
+ }).timeout(attemptTimeout);
3010
+ it('should error if - missing body', (done) => {
3011
+ try {
3012
+ a.update('fakeparam', null, (data, error) => {
3013
+ try {
3014
+ const displayE = 'body is required';
3015
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-update', displayE);
3016
+ done();
3017
+ } catch (err) {
3018
+ log.error(`Test Failure: ${err}`);
3019
+ done(err);
3020
+ }
3021
+ });
3022
+ } catch (error) {
3023
+ log.error(`Adapter Exception: ${error}`);
3024
+ done(error);
3025
+ }
3026
+ }).timeout(attemptTimeout);
3027
+ });
3028
+
3029
+ describe('#updateContacts - errors', () => {
3030
+ it('should have a updateContacts function', (done) => {
3031
+ try {
3032
+ assert.equal(true, typeof a.updateContacts === 'function');
3033
+ done();
3034
+ } catch (error) {
3035
+ log.error(`Test Failure: ${error}`);
3036
+ done(error);
3037
+ }
3038
+ }).timeout(attemptTimeout);
3039
+ it('should error if - missing domain', (done) => {
3040
+ try {
3041
+ a.updateContacts(null, null, (data, error) => {
3042
+ try {
3043
+ const displayE = 'domain is required';
3044
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-updateContacts', displayE);
3045
+ done();
3046
+ } catch (err) {
3047
+ log.error(`Test Failure: ${err}`);
3048
+ done(err);
3049
+ }
3050
+ });
3051
+ } catch (error) {
3052
+ log.error(`Adapter Exception: ${error}`);
3053
+ done(error);
3054
+ }
3055
+ }).timeout(attemptTimeout);
3056
+ it('should error if - missing contacts', (done) => {
3057
+ try {
3058
+ a.updateContacts('fakeparam', null, (data, error) => {
3059
+ try {
3060
+ const displayE = 'contacts is required';
3061
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-updateContacts', displayE);
3062
+ done();
3063
+ } catch (err) {
3064
+ log.error(`Test Failure: ${err}`);
3065
+ done(err);
3066
+ }
3067
+ });
3068
+ } catch (error) {
3069
+ log.error(`Adapter Exception: ${error}`);
3070
+ done(error);
3071
+ }
3072
+ }).timeout(attemptTimeout);
3073
+ });
3074
+
3075
+ describe('#cancelPrivacy - errors', () => {
3076
+ it('should have a cancelPrivacy function', (done) => {
3077
+ try {
3078
+ assert.equal(true, typeof a.cancelPrivacy === 'function');
3079
+ done();
3080
+ } catch (error) {
3081
+ log.error(`Test Failure: ${error}`);
3082
+ done(error);
3083
+ }
3084
+ }).timeout(attemptTimeout);
3085
+ it('should error if - missing domain', (done) => {
3086
+ try {
3087
+ a.cancelPrivacy(null, (data, error) => {
3088
+ try {
3089
+ const displayE = 'domain is required';
3090
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-cancelPrivacy', displayE);
3091
+ done();
3092
+ } catch (err) {
3093
+ log.error(`Test Failure: ${err}`);
3094
+ done(err);
3095
+ }
3096
+ });
3097
+ } catch (error) {
3098
+ log.error(`Adapter Exception: ${error}`);
3099
+ done(error);
3100
+ }
3101
+ }).timeout(attemptTimeout);
3102
+ });
3103
+
3104
+ describe('#purchasePrivacy - errors', () => {
3105
+ it('should have a purchasePrivacy function', (done) => {
3106
+ try {
3107
+ assert.equal(true, typeof a.purchasePrivacy === 'function');
3108
+ done();
3109
+ } catch (error) {
3110
+ log.error(`Test Failure: ${error}`);
3111
+ done(error);
3112
+ }
3113
+ }).timeout(attemptTimeout);
3114
+ it('should error if - missing domain', (done) => {
3115
+ try {
3116
+ a.purchasePrivacy(null, null, (data, error) => {
3117
+ try {
3118
+ const displayE = 'domain is required';
3119
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-purchasePrivacy', displayE);
3120
+ done();
3121
+ } catch (err) {
3122
+ log.error(`Test Failure: ${err}`);
3123
+ done(err);
3124
+ }
3125
+ });
3126
+ } catch (error) {
3127
+ log.error(`Adapter Exception: ${error}`);
3128
+ done(error);
3129
+ }
3130
+ }).timeout(attemptTimeout);
3131
+ it('should error if - missing body', (done) => {
3132
+ try {
3133
+ a.purchasePrivacy('fakeparam', null, (data, error) => {
3134
+ try {
3135
+ const displayE = 'body is required';
3136
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-purchasePrivacy', displayE);
3137
+ done();
3138
+ } catch (err) {
3139
+ log.error(`Test Failure: ${err}`);
3140
+ done(err);
3141
+ }
3142
+ });
3143
+ } catch (error) {
3144
+ log.error(`Adapter Exception: ${error}`);
3145
+ done(error);
3146
+ }
3147
+ }).timeout(attemptTimeout);
3148
+ });
3149
+
3150
+ describe('#recordAdd - errors', () => {
3151
+ it('should have a recordAdd function', (done) => {
3152
+ try {
3153
+ assert.equal(true, typeof a.recordAdd === 'function');
3154
+ done();
3155
+ } catch (error) {
3156
+ log.error(`Test Failure: ${error}`);
3157
+ done(error);
3158
+ }
3159
+ }).timeout(attemptTimeout);
3160
+ it('should error if - missing domain', (done) => {
3161
+ try {
3162
+ a.recordAdd(null, null, (data, error) => {
3163
+ try {
3164
+ const displayE = 'domain is required';
3165
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-recordAdd', displayE);
3166
+ done();
3167
+ } catch (err) {
3168
+ log.error(`Test Failure: ${err}`);
3169
+ done(err);
3170
+ }
3171
+ });
3172
+ } catch (error) {
3173
+ log.error(`Adapter Exception: ${error}`);
3174
+ done(error);
3175
+ }
3176
+ }).timeout(attemptTimeout);
3177
+ it('should error if - missing records', (done) => {
3178
+ try {
3179
+ a.recordAdd('fakeparam', null, (data, error) => {
3180
+ try {
3181
+ const displayE = 'records is required';
3182
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-recordAdd', displayE);
3183
+ done();
3184
+ } catch (err) {
3185
+ log.error(`Test Failure: ${err}`);
3186
+ done(err);
3187
+ }
3188
+ });
3189
+ } catch (error) {
3190
+ log.error(`Adapter Exception: ${error}`);
3191
+ done(error);
3192
+ }
3193
+ }).timeout(attemptTimeout);
3194
+ });
3195
+
3196
+ describe('#recordReplace - errors', () => {
3197
+ it('should have a recordReplace function', (done) => {
3198
+ try {
3199
+ assert.equal(true, typeof a.recordReplace === 'function');
3200
+ done();
3201
+ } catch (error) {
3202
+ log.error(`Test Failure: ${error}`);
3203
+ done(error);
3204
+ }
3205
+ }).timeout(attemptTimeout);
3206
+ it('should error if - missing domain', (done) => {
3207
+ try {
3208
+ a.recordReplace(null, null, (data, error) => {
3209
+ try {
3210
+ const displayE = 'domain is required';
3211
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-recordReplace', displayE);
3212
+ done();
3213
+ } catch (err) {
3214
+ log.error(`Test Failure: ${err}`);
3215
+ done(err);
3216
+ }
3217
+ });
3218
+ } catch (error) {
3219
+ log.error(`Adapter Exception: ${error}`);
3220
+ done(error);
3221
+ }
3222
+ }).timeout(attemptTimeout);
3223
+ it('should error if - missing records', (done) => {
3224
+ try {
3225
+ a.recordReplace('fakeparam', null, (data, error) => {
3226
+ try {
3227
+ const displayE = 'records is required';
3228
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-recordReplace', displayE);
3229
+ done();
3230
+ } catch (err) {
3231
+ log.error(`Test Failure: ${err}`);
3232
+ done(err);
3233
+ }
3234
+ });
3235
+ } catch (error) {
3236
+ log.error(`Adapter Exception: ${error}`);
3237
+ done(error);
3238
+ }
3239
+ }).timeout(attemptTimeout);
3240
+ });
3241
+
3242
+ describe('#recordGet - errors', () => {
3243
+ it('should have a recordGet function', (done) => {
3244
+ try {
3245
+ assert.equal(true, typeof a.recordGet === 'function');
3246
+ done();
3247
+ } catch (error) {
3248
+ log.error(`Test Failure: ${error}`);
3249
+ done(error);
3250
+ }
3251
+ }).timeout(attemptTimeout);
3252
+ it('should error if - missing domain', (done) => {
3253
+ try {
3254
+ a.recordGet(null, null, null, null, null, (data, error) => {
3255
+ try {
3256
+ const displayE = 'domain is required';
3257
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-recordGet', displayE);
3258
+ done();
3259
+ } catch (err) {
3260
+ log.error(`Test Failure: ${err}`);
3261
+ done(err);
3262
+ }
3263
+ });
3264
+ } catch (error) {
3265
+ log.error(`Adapter Exception: ${error}`);
3266
+ done(error);
3267
+ }
3268
+ }).timeout(attemptTimeout);
3269
+ it('should error if - missing type', (done) => {
3270
+ try {
3271
+ a.recordGet('fakeparam', null, null, null, null, (data, error) => {
3272
+ try {
3273
+ const displayE = 'type is required';
3274
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-recordGet', displayE);
3275
+ done();
3276
+ } catch (err) {
3277
+ log.error(`Test Failure: ${err}`);
3278
+ done(err);
3279
+ }
3280
+ });
3281
+ } catch (error) {
3282
+ log.error(`Adapter Exception: ${error}`);
3283
+ done(error);
3284
+ }
3285
+ }).timeout(attemptTimeout);
3286
+ it('should error if - missing name', (done) => {
3287
+ try {
3288
+ a.recordGet('fakeparam', 'fakeparam', null, null, null, (data, error) => {
3289
+ try {
3290
+ const displayE = 'name is required';
3291
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-recordGet', displayE);
3292
+ done();
3293
+ } catch (err) {
3294
+ log.error(`Test Failure: ${err}`);
3295
+ done(err);
3296
+ }
3297
+ });
3298
+ } catch (error) {
3299
+ log.error(`Adapter Exception: ${error}`);
3300
+ done(error);
3301
+ }
3302
+ }).timeout(attemptTimeout);
3303
+ });
3304
+
3305
+ describe('#recordReplaceTypeName - errors', () => {
3306
+ it('should have a recordReplaceTypeName function', (done) => {
3307
+ try {
3308
+ assert.equal(true, typeof a.recordReplaceTypeName === 'function');
3309
+ done();
3310
+ } catch (error) {
3311
+ log.error(`Test Failure: ${error}`);
3312
+ done(error);
3313
+ }
3314
+ }).timeout(attemptTimeout);
3315
+ it('should error if - missing domain', (done) => {
3316
+ try {
3317
+ a.recordReplaceTypeName(null, null, null, null, (data, error) => {
3318
+ try {
3319
+ const displayE = 'domain is required';
3320
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-recordReplaceTypeName', displayE);
3321
+ done();
3322
+ } catch (err) {
3323
+ log.error(`Test Failure: ${err}`);
3324
+ done(err);
3325
+ }
3326
+ });
3327
+ } catch (error) {
3328
+ log.error(`Adapter Exception: ${error}`);
3329
+ done(error);
3330
+ }
3331
+ }).timeout(attemptTimeout);
3332
+ it('should error if - missing type', (done) => {
3333
+ try {
3334
+ a.recordReplaceTypeName('fakeparam', null, null, null, (data, error) => {
3335
+ try {
3336
+ const displayE = 'type is required';
3337
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-recordReplaceTypeName', displayE);
3338
+ done();
3339
+ } catch (err) {
3340
+ log.error(`Test Failure: ${err}`);
3341
+ done(err);
3342
+ }
3343
+ });
3344
+ } catch (error) {
3345
+ log.error(`Adapter Exception: ${error}`);
3346
+ done(error);
3347
+ }
3348
+ }).timeout(attemptTimeout);
3349
+ it('should error if - missing name', (done) => {
3350
+ try {
3351
+ a.recordReplaceTypeName('fakeparam', 'fakeparam', null, null, (data, error) => {
3352
+ try {
3353
+ const displayE = 'name is required';
3354
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-recordReplaceTypeName', displayE);
3355
+ done();
3356
+ } catch (err) {
3357
+ log.error(`Test Failure: ${err}`);
3358
+ done(err);
3359
+ }
3360
+ });
3361
+ } catch (error) {
3362
+ log.error(`Adapter Exception: ${error}`);
3363
+ done(error);
3364
+ }
3365
+ }).timeout(attemptTimeout);
3366
+ it('should error if - missing records', (done) => {
3367
+ try {
3368
+ a.recordReplaceTypeName('fakeparam', 'fakeparam', 'fakeparam', null, (data, error) => {
3369
+ try {
3370
+ const displayE = 'records is required';
3371
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-recordReplaceTypeName', displayE);
3372
+ done();
3373
+ } catch (err) {
3374
+ log.error(`Test Failure: ${err}`);
3375
+ done(err);
3376
+ }
3377
+ });
3378
+ } catch (error) {
3379
+ log.error(`Adapter Exception: ${error}`);
3380
+ done(error);
3381
+ }
3382
+ }).timeout(attemptTimeout);
3383
+ });
3384
+
3385
+ describe('#recordDeleteTypeName - errors', () => {
3386
+ it('should have a recordDeleteTypeName function', (done) => {
3387
+ try {
3388
+ assert.equal(true, typeof a.recordDeleteTypeName === 'function');
3389
+ done();
3390
+ } catch (error) {
3391
+ log.error(`Test Failure: ${error}`);
3392
+ done(error);
3393
+ }
3394
+ }).timeout(attemptTimeout);
3395
+ it('should error if - missing domain', (done) => {
3396
+ try {
3397
+ a.recordDeleteTypeName(null, null, null, (data, error) => {
3398
+ try {
3399
+ const displayE = 'domain is required';
3400
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-recordDeleteTypeName', displayE);
3401
+ done();
3402
+ } catch (err) {
3403
+ log.error(`Test Failure: ${err}`);
3404
+ done(err);
3405
+ }
3406
+ });
3407
+ } catch (error) {
3408
+ log.error(`Adapter Exception: ${error}`);
3409
+ done(error);
3410
+ }
3411
+ }).timeout(attemptTimeout);
3412
+ it('should error if - missing type', (done) => {
3413
+ try {
3414
+ a.recordDeleteTypeName('fakeparam', null, null, (data, error) => {
3415
+ try {
3416
+ const displayE = 'type is required';
3417
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-recordDeleteTypeName', displayE);
3418
+ done();
3419
+ } catch (err) {
3420
+ log.error(`Test Failure: ${err}`);
3421
+ done(err);
3422
+ }
3423
+ });
3424
+ } catch (error) {
3425
+ log.error(`Adapter Exception: ${error}`);
3426
+ done(error);
3427
+ }
3428
+ }).timeout(attemptTimeout);
3429
+ it('should error if - missing name', (done) => {
3430
+ try {
3431
+ a.recordDeleteTypeName('fakeparam', 'fakeparam', null, (data, error) => {
3432
+ try {
3433
+ const displayE = 'name is required';
3434
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-recordDeleteTypeName', displayE);
3435
+ done();
3436
+ } catch (err) {
3437
+ log.error(`Test Failure: ${err}`);
3438
+ done(err);
3439
+ }
3440
+ });
3441
+ } catch (error) {
3442
+ log.error(`Adapter Exception: ${error}`);
3443
+ done(error);
3444
+ }
3445
+ }).timeout(attemptTimeout);
3446
+ });
3447
+
3448
+ describe('#recordReplaceType - errors', () => {
3449
+ it('should have a recordReplaceType function', (done) => {
3450
+ try {
3451
+ assert.equal(true, typeof a.recordReplaceType === 'function');
3452
+ done();
3453
+ } catch (error) {
3454
+ log.error(`Test Failure: ${error}`);
3455
+ done(error);
3456
+ }
3457
+ }).timeout(attemptTimeout);
3458
+ it('should error if - missing domain', (done) => {
3459
+ try {
3460
+ a.recordReplaceType(null, null, null, (data, error) => {
3461
+ try {
3462
+ const displayE = 'domain is required';
3463
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-recordReplaceType', displayE);
3464
+ done();
3465
+ } catch (err) {
3466
+ log.error(`Test Failure: ${err}`);
3467
+ done(err);
3468
+ }
3469
+ });
3470
+ } catch (error) {
3471
+ log.error(`Adapter Exception: ${error}`);
3472
+ done(error);
3473
+ }
3474
+ }).timeout(attemptTimeout);
3475
+ it('should error if - missing type', (done) => {
3476
+ try {
3477
+ a.recordReplaceType('fakeparam', null, null, (data, error) => {
3478
+ try {
3479
+ const displayE = 'type is required';
3480
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-recordReplaceType', displayE);
3481
+ done();
3482
+ } catch (err) {
3483
+ log.error(`Test Failure: ${err}`);
3484
+ done(err);
3485
+ }
3486
+ });
3487
+ } catch (error) {
3488
+ log.error(`Adapter Exception: ${error}`);
3489
+ done(error);
3490
+ }
3491
+ }).timeout(attemptTimeout);
3492
+ it('should error if - missing records', (done) => {
3493
+ try {
3494
+ a.recordReplaceType('fakeparam', 'fakeparam', null, (data, error) => {
3495
+ try {
3496
+ const displayE = 'records is required';
3497
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-recordReplaceType', displayE);
3498
+ done();
3499
+ } catch (err) {
3500
+ log.error(`Test Failure: ${err}`);
3501
+ done(err);
3502
+ }
3503
+ });
3504
+ } catch (error) {
3505
+ log.error(`Adapter Exception: ${error}`);
3506
+ done(error);
3507
+ }
3508
+ }).timeout(attemptTimeout);
3509
+ });
3510
+
3511
+ describe('#renew - errors', () => {
3512
+ it('should have a renew function', (done) => {
3513
+ try {
3514
+ assert.equal(true, typeof a.renew === 'function');
3515
+ done();
3516
+ } catch (error) {
3517
+ log.error(`Test Failure: ${error}`);
3518
+ done(error);
3519
+ }
3520
+ }).timeout(attemptTimeout);
3521
+ it('should error if - missing domain', (done) => {
3522
+ try {
3523
+ a.renew(null, null, (data, error) => {
3524
+ try {
3525
+ const displayE = 'domain is required';
3526
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-renew', displayE);
3527
+ done();
3528
+ } catch (err) {
3529
+ log.error(`Test Failure: ${err}`);
3530
+ done(err);
3531
+ }
3532
+ });
3533
+ } catch (error) {
3534
+ log.error(`Adapter Exception: ${error}`);
3535
+ done(error);
3536
+ }
3537
+ }).timeout(attemptTimeout);
3538
+ });
3539
+
3540
+ describe('#transferIn - errors', () => {
3541
+ it('should have a transferIn function', (done) => {
3542
+ try {
3543
+ assert.equal(true, typeof a.transferIn === 'function');
3544
+ done();
3545
+ } catch (error) {
3546
+ log.error(`Test Failure: ${error}`);
3547
+ done(error);
3548
+ }
3549
+ }).timeout(attemptTimeout);
3550
+ it('should error if - missing domain', (done) => {
3551
+ try {
3552
+ a.transferIn(null, null, (data, error) => {
3553
+ try {
3554
+ const displayE = 'domain is required';
3555
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-transferIn', displayE);
3556
+ done();
3557
+ } catch (err) {
3558
+ log.error(`Test Failure: ${err}`);
3559
+ done(err);
3560
+ }
3561
+ });
3562
+ } catch (error) {
3563
+ log.error(`Adapter Exception: ${error}`);
3564
+ done(error);
3565
+ }
3566
+ }).timeout(attemptTimeout);
3567
+ it('should error if - missing body', (done) => {
3568
+ try {
3569
+ a.transferIn('fakeparam', null, (data, error) => {
3570
+ try {
3571
+ const displayE = 'body is required';
3572
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-transferIn', displayE);
3573
+ done();
3574
+ } catch (err) {
3575
+ log.error(`Test Failure: ${err}`);
3576
+ done(err);
3577
+ }
3578
+ });
3579
+ } catch (error) {
3580
+ log.error(`Adapter Exception: ${error}`);
3581
+ done(error);
3582
+ }
3583
+ }).timeout(attemptTimeout);
3584
+ });
3585
+
3586
+ describe('#verifyEmail - errors', () => {
3587
+ it('should have a verifyEmail function', (done) => {
3588
+ try {
3589
+ assert.equal(true, typeof a.verifyEmail === 'function');
3590
+ done();
3591
+ } catch (error) {
3592
+ log.error(`Test Failure: ${error}`);
3593
+ done(error);
3594
+ }
3595
+ }).timeout(attemptTimeout);
3596
+ it('should error if - missing domain', (done) => {
3597
+ try {
3598
+ a.verifyEmail(null, (data, error) => {
3599
+ try {
3600
+ const displayE = 'domain is required';
3601
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-verifyEmail', displayE);
3602
+ done();
3603
+ } catch (err) {
3604
+ log.error(`Test Failure: ${err}`);
3605
+ done(err);
3606
+ }
3607
+ });
3608
+ } catch (error) {
3609
+ log.error(`Adapter Exception: ${error}`);
3610
+ done(error);
3611
+ }
3612
+ }).timeout(attemptTimeout);
3613
+ });
3614
+
3615
+ describe('#getV2CustomersCustomerIdDomainsDomain - errors', () => {
3616
+ it('should have a getV2CustomersCustomerIdDomainsDomain function', (done) => {
3617
+ try {
3618
+ assert.equal(true, typeof a.getV2CustomersCustomerIdDomainsDomain === 'function');
3619
+ done();
3620
+ } catch (error) {
3621
+ log.error(`Test Failure: ${error}`);
3622
+ done(error);
3623
+ }
3624
+ }).timeout(attemptTimeout);
3625
+ it('should error if - missing customerId', (done) => {
3626
+ try {
3627
+ a.getV2CustomersCustomerIdDomainsDomain(null, null, null, (data, error) => {
3628
+ try {
3629
+ const displayE = 'customerId is required';
3630
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getV2CustomersCustomerIdDomainsDomain', displayE);
3631
+ done();
3632
+ } catch (err) {
3633
+ log.error(`Test Failure: ${err}`);
3634
+ done(err);
3635
+ }
3636
+ });
3637
+ } catch (error) {
3638
+ log.error(`Adapter Exception: ${error}`);
3639
+ done(error);
3640
+ }
3641
+ }).timeout(attemptTimeout);
3642
+ it('should error if - missing domain', (done) => {
3643
+ try {
3644
+ a.getV2CustomersCustomerIdDomainsDomain('fakeparam', null, null, (data, error) => {
3645
+ try {
3646
+ const displayE = 'domain is required';
3647
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getV2CustomersCustomerIdDomainsDomain', displayE);
3648
+ done();
3649
+ } catch (err) {
3650
+ log.error(`Test Failure: ${err}`);
3651
+ done(err);
3652
+ }
3653
+ });
3654
+ } catch (error) {
3655
+ log.error(`Adapter Exception: ${error}`);
3656
+ done(error);
3657
+ }
3658
+ }).timeout(attemptTimeout);
3659
+ });
3660
+
3661
+ describe('#postV2CustomersCustomerIdDomainsDomainRedeem - errors', () => {
3662
+ it('should have a postV2CustomersCustomerIdDomainsDomainRedeem function', (done) => {
3663
+ try {
3664
+ assert.equal(true, typeof a.postV2CustomersCustomerIdDomainsDomainRedeem === 'function');
3665
+ done();
3666
+ } catch (error) {
3667
+ log.error(`Test Failure: ${error}`);
3668
+ done(error);
3669
+ }
3670
+ }).timeout(attemptTimeout);
3671
+ it('should error if - missing customerId', (done) => {
3672
+ try {
3673
+ a.postV2CustomersCustomerIdDomainsDomainRedeem(null, null, null, (data, error) => {
3674
+ try {
3675
+ const displayE = 'customerId is required';
3676
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-postV2CustomersCustomerIdDomainsDomainRedeem', displayE);
3677
+ done();
3678
+ } catch (err) {
3679
+ log.error(`Test Failure: ${err}`);
3680
+ done(err);
3681
+ }
3682
+ });
3683
+ } catch (error) {
3684
+ log.error(`Adapter Exception: ${error}`);
3685
+ done(error);
3686
+ }
3687
+ }).timeout(attemptTimeout);
3688
+ it('should error if - missing domain', (done) => {
3689
+ try {
3690
+ a.postV2CustomersCustomerIdDomainsDomainRedeem('fakeparam', null, null, (data, error) => {
3691
+ try {
3692
+ const displayE = 'domain is required';
3693
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-postV2CustomersCustomerIdDomainsDomainRedeem', displayE);
3694
+ done();
3695
+ } catch (err) {
3696
+ log.error(`Test Failure: ${err}`);
3697
+ done(err);
3698
+ }
3699
+ });
3700
+ } catch (error) {
3701
+ log.error(`Adapter Exception: ${error}`);
3702
+ done(error);
3703
+ }
3704
+ }).timeout(attemptTimeout);
3705
+ });
3706
+
3707
+ describe('#postV2CustomersCustomerIdDomainsDomainTransferOut - errors', () => {
3708
+ it('should have a postV2CustomersCustomerIdDomainsDomainTransferOut function', (done) => {
3709
+ try {
3710
+ assert.equal(true, typeof a.postV2CustomersCustomerIdDomainsDomainTransferOut === 'function');
3711
+ done();
3712
+ } catch (error) {
3713
+ log.error(`Test Failure: ${error}`);
3714
+ done(error);
3715
+ }
3716
+ }).timeout(attemptTimeout);
3717
+ it('should error if - missing customerId', (done) => {
3718
+ try {
3719
+ a.postV2CustomersCustomerIdDomainsDomainTransferOut(null, null, null, (data, error) => {
3720
+ try {
3721
+ const displayE = 'customerId is required';
3722
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-postV2CustomersCustomerIdDomainsDomainTransferOut', displayE);
3723
+ done();
3724
+ } catch (err) {
3725
+ log.error(`Test Failure: ${err}`);
3726
+ done(err);
3727
+ }
3728
+ });
3729
+ } catch (error) {
3730
+ log.error(`Adapter Exception: ${error}`);
3731
+ done(error);
3732
+ }
3733
+ }).timeout(attemptTimeout);
3734
+ it('should error if - missing domain', (done) => {
3735
+ try {
3736
+ a.postV2CustomersCustomerIdDomainsDomainTransferOut('fakeparam', null, null, (data, error) => {
3737
+ try {
3738
+ const displayE = 'domain is required';
3739
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-postV2CustomersCustomerIdDomainsDomainTransferOut', displayE);
3740
+ done();
3741
+ } catch (err) {
3742
+ log.error(`Test Failure: ${err}`);
3743
+ done(err);
3744
+ }
3745
+ });
3746
+ } catch (error) {
3747
+ log.error(`Adapter Exception: ${error}`);
3748
+ done(error);
3749
+ }
3750
+ }).timeout(attemptTimeout);
3751
+ it('should error if - missing registrar', (done) => {
3752
+ try {
3753
+ a.postV2CustomersCustomerIdDomainsDomainTransferOut('fakeparam', 'fakeparam', null, (data, error) => {
3754
+ try {
3755
+ const displayE = 'registrar is required';
3756
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-postV2CustomersCustomerIdDomainsDomainTransferOut', displayE);
3757
+ done();
3758
+ } catch (err) {
3759
+ log.error(`Test Failure: ${err}`);
3760
+ done(err);
3761
+ }
3762
+ });
3763
+ } catch (error) {
3764
+ log.error(`Adapter Exception: ${error}`);
3765
+ done(error);
3766
+ }
3767
+ }).timeout(attemptTimeout);
3768
+ });
3769
+
3770
+ describe('#domainsForwardsDelete - errors', () => {
3771
+ it('should have a domainsForwardsDelete function', (done) => {
3772
+ try {
3773
+ assert.equal(true, typeof a.domainsForwardsDelete === 'function');
3774
+ done();
3775
+ } catch (error) {
3776
+ log.error(`Test Failure: ${error}`);
3777
+ done(error);
3778
+ }
3779
+ }).timeout(attemptTimeout);
3780
+ it('should error if - missing customerId', (done) => {
3781
+ try {
3782
+ a.domainsForwardsDelete(null, null, (data, error) => {
3783
+ try {
3784
+ const displayE = 'customerId is required';
3785
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-domainsForwardsDelete', displayE);
3786
+ done();
3787
+ } catch (err) {
3788
+ log.error(`Test Failure: ${err}`);
3789
+ done(err);
3790
+ }
3791
+ });
3792
+ } catch (error) {
3793
+ log.error(`Adapter Exception: ${error}`);
3794
+ done(error);
3795
+ }
3796
+ }).timeout(attemptTimeout);
3797
+ it('should error if - missing fqdn', (done) => {
3798
+ try {
3799
+ a.domainsForwardsDelete('fakeparam', null, (data, error) => {
3800
+ try {
3801
+ const displayE = 'fqdn is required';
3802
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-domainsForwardsDelete', displayE);
3803
+ done();
3804
+ } catch (err) {
3805
+ log.error(`Test Failure: ${err}`);
3806
+ done(err);
3807
+ }
3808
+ });
3809
+ } catch (error) {
3810
+ log.error(`Adapter Exception: ${error}`);
3811
+ done(error);
3812
+ }
3813
+ }).timeout(attemptTimeout);
3814
+ });
3815
+
3816
+ describe('#domainsForwardsGet - errors', () => {
3817
+ it('should have a domainsForwardsGet function', (done) => {
3818
+ try {
3819
+ assert.equal(true, typeof a.domainsForwardsGet === 'function');
3820
+ done();
3821
+ } catch (error) {
3822
+ log.error(`Test Failure: ${error}`);
3823
+ done(error);
3824
+ }
3825
+ }).timeout(attemptTimeout);
3826
+ it('should error if - missing customerId', (done) => {
3827
+ try {
3828
+ a.domainsForwardsGet(null, null, null, (data, error) => {
3829
+ try {
3830
+ const displayE = 'customerId is required';
3831
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-domainsForwardsGet', displayE);
3832
+ done();
3833
+ } catch (err) {
3834
+ log.error(`Test Failure: ${err}`);
3835
+ done(err);
3836
+ }
3837
+ });
3838
+ } catch (error) {
3839
+ log.error(`Adapter Exception: ${error}`);
3840
+ done(error);
3841
+ }
3842
+ }).timeout(attemptTimeout);
3843
+ it('should error if - missing fqdn', (done) => {
3844
+ try {
3845
+ a.domainsForwardsGet('fakeparam', null, null, (data, error) => {
3846
+ try {
3847
+ const displayE = 'fqdn is required';
3848
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-domainsForwardsGet', displayE);
3849
+ done();
3850
+ } catch (err) {
3851
+ log.error(`Test Failure: ${err}`);
3852
+ done(err);
3853
+ }
3854
+ });
3855
+ } catch (error) {
3856
+ log.error(`Adapter Exception: ${error}`);
3857
+ done(error);
3858
+ }
3859
+ }).timeout(attemptTimeout);
3860
+ });
3861
+
3862
+ describe('#domainsForwardsPut - errors', () => {
3863
+ it('should have a domainsForwardsPut function', (done) => {
3864
+ try {
3865
+ assert.equal(true, typeof a.domainsForwardsPut === 'function');
3866
+ done();
3867
+ } catch (error) {
3868
+ log.error(`Test Failure: ${error}`);
3869
+ done(error);
3870
+ }
3871
+ }).timeout(attemptTimeout);
3872
+ it('should error if - missing customerId', (done) => {
3873
+ try {
3874
+ a.domainsForwardsPut(null, null, null, (data, error) => {
3875
+ try {
3876
+ const displayE = 'customerId is required';
3877
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-domainsForwardsPut', displayE);
3878
+ done();
3879
+ } catch (err) {
3880
+ log.error(`Test Failure: ${err}`);
3881
+ done(err);
3882
+ }
3883
+ });
3884
+ } catch (error) {
3885
+ log.error(`Adapter Exception: ${error}`);
3886
+ done(error);
3887
+ }
3888
+ }).timeout(attemptTimeout);
3889
+ it('should error if - missing fqdn', (done) => {
3890
+ try {
3891
+ a.domainsForwardsPut('fakeparam', null, null, (data, error) => {
3892
+ try {
3893
+ const displayE = 'fqdn is required';
3894
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-domainsForwardsPut', displayE);
3895
+ done();
3896
+ } catch (err) {
3897
+ log.error(`Test Failure: ${err}`);
3898
+ done(err);
3899
+ }
3900
+ });
3901
+ } catch (error) {
3902
+ log.error(`Adapter Exception: ${error}`);
3903
+ done(error);
3904
+ }
3905
+ }).timeout(attemptTimeout);
3906
+ it('should error if - missing body', (done) => {
3907
+ try {
3908
+ a.domainsForwardsPut('fakeparam', 'fakeparam', null, (data, error) => {
3909
+ try {
3910
+ const displayE = 'body is required';
3911
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-domainsForwardsPut', displayE);
3912
+ done();
3913
+ } catch (err) {
3914
+ log.error(`Test Failure: ${err}`);
3915
+ done(err);
3916
+ }
3917
+ });
3918
+ } catch (error) {
3919
+ log.error(`Adapter Exception: ${error}`);
3920
+ done(error);
3921
+ }
3922
+ }).timeout(attemptTimeout);
3923
+ });
3924
+
3925
+ describe('#domainsForwardsPost - errors', () => {
3926
+ it('should have a domainsForwardsPost function', (done) => {
3927
+ try {
3928
+ assert.equal(true, typeof a.domainsForwardsPost === 'function');
3929
+ done();
3930
+ } catch (error) {
3931
+ log.error(`Test Failure: ${error}`);
3932
+ done(error);
3933
+ }
3934
+ }).timeout(attemptTimeout);
3935
+ it('should error if - missing customerId', (done) => {
3936
+ try {
3937
+ a.domainsForwardsPost(null, null, null, (data, error) => {
3938
+ try {
3939
+ const displayE = 'customerId is required';
3940
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-domainsForwardsPost', displayE);
3941
+ done();
3942
+ } catch (err) {
3943
+ log.error(`Test Failure: ${err}`);
3944
+ done(err);
3945
+ }
3946
+ });
3947
+ } catch (error) {
3948
+ log.error(`Adapter Exception: ${error}`);
3949
+ done(error);
3950
+ }
3951
+ }).timeout(attemptTimeout);
3952
+ it('should error if - missing fqdn', (done) => {
3953
+ try {
3954
+ a.domainsForwardsPost('fakeparam', null, null, (data, error) => {
3955
+ try {
3956
+ const displayE = 'fqdn is required';
3957
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-domainsForwardsPost', displayE);
3958
+ done();
3959
+ } catch (err) {
3960
+ log.error(`Test Failure: ${err}`);
3961
+ done(err);
3962
+ }
3963
+ });
3964
+ } catch (error) {
3965
+ log.error(`Adapter Exception: ${error}`);
3966
+ done(error);
3967
+ }
3968
+ }).timeout(attemptTimeout);
3969
+ it('should error if - missing body', (done) => {
3970
+ try {
3971
+ a.domainsForwardsPost('fakeparam', 'fakeparam', null, (data, error) => {
3972
+ try {
3973
+ const displayE = 'body is required';
3974
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-domainsForwardsPost', displayE);
3975
+ done();
3976
+ } catch (err) {
3977
+ log.error(`Test Failure: ${err}`);
3978
+ done(err);
3979
+ }
3980
+ });
3981
+ } catch (error) {
3982
+ log.error(`Adapter Exception: ${error}`);
3983
+ done(error);
3984
+ }
3985
+ }).timeout(attemptTimeout);
3986
+ });
3987
+
3988
+ describe('#getV2DomainsMaintenances - errors', () => {
3989
+ it('should have a getV2DomainsMaintenances function', (done) => {
3990
+ try {
3991
+ assert.equal(true, typeof a.getV2DomainsMaintenances === 'function');
3992
+ done();
3993
+ } catch (error) {
3994
+ log.error(`Test Failure: ${error}`);
3995
+ done(error);
3996
+ }
3997
+ }).timeout(attemptTimeout);
3998
+ });
3999
+
4000
+ describe('#getV2DomainsMaintenancesMaintenanceId - errors', () => {
4001
+ it('should have a getV2DomainsMaintenancesMaintenanceId function', (done) => {
4002
+ try {
4003
+ assert.equal(true, typeof a.getV2DomainsMaintenancesMaintenanceId === 'function');
4004
+ done();
4005
+ } catch (error) {
4006
+ log.error(`Test Failure: ${error}`);
4007
+ done(error);
4008
+ }
4009
+ }).timeout(attemptTimeout);
4010
+ it('should error if - missing maintenanceId', (done) => {
4011
+ try {
4012
+ a.getV2DomainsMaintenancesMaintenanceId(null, (data, error) => {
4013
+ try {
4014
+ const displayE = 'maintenanceId is required';
4015
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getV2DomainsMaintenancesMaintenanceId', displayE);
4016
+ done();
4017
+ } catch (err) {
4018
+ log.error(`Test Failure: ${err}`);
4019
+ done(err);
4020
+ }
4021
+ });
4022
+ } catch (error) {
4023
+ log.error(`Adapter Exception: ${error}`);
4024
+ done(error);
4025
+ }
4026
+ }).timeout(attemptTimeout);
4027
+ });
4028
+
4029
+ describe('#getV2CustomersCustomerIdDomainsDomainActions - errors', () => {
4030
+ it('should have a getV2CustomersCustomerIdDomainsDomainActions function', (done) => {
4031
+ try {
4032
+ assert.equal(true, typeof a.getV2CustomersCustomerIdDomainsDomainActions === 'function');
4033
+ done();
4034
+ } catch (error) {
4035
+ log.error(`Test Failure: ${error}`);
4036
+ done(error);
4037
+ }
4038
+ }).timeout(attemptTimeout);
4039
+ it('should error if - missing customerId', (done) => {
4040
+ try {
4041
+ a.getV2CustomersCustomerIdDomainsDomainActions(null, null, (data, error) => {
4042
+ try {
4043
+ const displayE = 'customerId is required';
4044
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getV2CustomersCustomerIdDomainsDomainActions', displayE);
4045
+ done();
4046
+ } catch (err) {
4047
+ log.error(`Test Failure: ${err}`);
4048
+ done(err);
4049
+ }
4050
+ });
4051
+ } catch (error) {
4052
+ log.error(`Adapter Exception: ${error}`);
4053
+ done(error);
4054
+ }
4055
+ }).timeout(attemptTimeout);
4056
+ it('should error if - missing domain', (done) => {
4057
+ try {
4058
+ a.getV2CustomersCustomerIdDomainsDomainActions('fakeparam', null, (data, error) => {
4059
+ try {
4060
+ const displayE = 'domain is required';
4061
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getV2CustomersCustomerIdDomainsDomainActions', displayE);
4062
+ done();
4063
+ } catch (err) {
4064
+ log.error(`Test Failure: ${err}`);
4065
+ done(err);
4066
+ }
4067
+ });
4068
+ } catch (error) {
4069
+ log.error(`Adapter Exception: ${error}`);
4070
+ done(error);
4071
+ }
4072
+ }).timeout(attemptTimeout);
4073
+ });
4074
+
4075
+ describe('#deleteV2CustomersCustomerIdDomainsDomainActionsType - errors', () => {
4076
+ it('should have a deleteV2CustomersCustomerIdDomainsDomainActionsType function', (done) => {
4077
+ try {
4078
+ assert.equal(true, typeof a.deleteV2CustomersCustomerIdDomainsDomainActionsType === 'function');
4079
+ done();
4080
+ } catch (error) {
4081
+ log.error(`Test Failure: ${error}`);
4082
+ done(error);
4083
+ }
4084
+ }).timeout(attemptTimeout);
4085
+ it('should error if - missing customerId', (done) => {
4086
+ try {
4087
+ a.deleteV2CustomersCustomerIdDomainsDomainActionsType(null, null, null, (data, error) => {
4088
+ try {
4089
+ const displayE = 'customerId is required';
4090
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-deleteV2CustomersCustomerIdDomainsDomainActionsType', displayE);
4091
+ done();
4092
+ } catch (err) {
4093
+ log.error(`Test Failure: ${err}`);
4094
+ done(err);
4095
+ }
4096
+ });
4097
+ } catch (error) {
4098
+ log.error(`Adapter Exception: ${error}`);
4099
+ done(error);
4100
+ }
4101
+ }).timeout(attemptTimeout);
4102
+ it('should error if - missing domain', (done) => {
4103
+ try {
4104
+ a.deleteV2CustomersCustomerIdDomainsDomainActionsType('fakeparam', null, null, (data, error) => {
4105
+ try {
4106
+ const displayE = 'domain is required';
4107
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-deleteV2CustomersCustomerIdDomainsDomainActionsType', displayE);
4108
+ done();
4109
+ } catch (err) {
4110
+ log.error(`Test Failure: ${err}`);
4111
+ done(err);
4112
+ }
4113
+ });
4114
+ } catch (error) {
4115
+ log.error(`Adapter Exception: ${error}`);
4116
+ done(error);
4117
+ }
4118
+ }).timeout(attemptTimeout);
4119
+ it('should error if - missing type', (done) => {
4120
+ try {
4121
+ a.deleteV2CustomersCustomerIdDomainsDomainActionsType('fakeparam', 'fakeparam', null, (data, error) => {
4122
+ try {
4123
+ const displayE = 'type is required';
4124
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-deleteV2CustomersCustomerIdDomainsDomainActionsType', displayE);
4125
+ done();
4126
+ } catch (err) {
4127
+ log.error(`Test Failure: ${err}`);
4128
+ done(err);
4129
+ }
4130
+ });
4131
+ } catch (error) {
4132
+ log.error(`Adapter Exception: ${error}`);
4133
+ done(error);
4134
+ }
4135
+ }).timeout(attemptTimeout);
4136
+ });
4137
+
4138
+ describe('#getV2CustomersCustomerIdDomainsDomainActionsType - errors', () => {
4139
+ it('should have a getV2CustomersCustomerIdDomainsDomainActionsType function', (done) => {
4140
+ try {
4141
+ assert.equal(true, typeof a.getV2CustomersCustomerIdDomainsDomainActionsType === 'function');
4142
+ done();
4143
+ } catch (error) {
4144
+ log.error(`Test Failure: ${error}`);
4145
+ done(error);
4146
+ }
4147
+ }).timeout(attemptTimeout);
4148
+ it('should error if - missing customerId', (done) => {
4149
+ try {
4150
+ a.getV2CustomersCustomerIdDomainsDomainActionsType(null, null, null, (data, error) => {
4151
+ try {
4152
+ const displayE = 'customerId is required';
4153
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getV2CustomersCustomerIdDomainsDomainActionsType', displayE);
4154
+ done();
4155
+ } catch (err) {
4156
+ log.error(`Test Failure: ${err}`);
4157
+ done(err);
4158
+ }
4159
+ });
4160
+ } catch (error) {
4161
+ log.error(`Adapter Exception: ${error}`);
4162
+ done(error);
4163
+ }
4164
+ }).timeout(attemptTimeout);
4165
+ it('should error if - missing domain', (done) => {
4166
+ try {
4167
+ a.getV2CustomersCustomerIdDomainsDomainActionsType('fakeparam', null, null, (data, error) => {
4168
+ try {
4169
+ const displayE = 'domain is required';
4170
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getV2CustomersCustomerIdDomainsDomainActionsType', displayE);
4171
+ done();
4172
+ } catch (err) {
4173
+ log.error(`Test Failure: ${err}`);
4174
+ done(err);
4175
+ }
4176
+ });
4177
+ } catch (error) {
4178
+ log.error(`Adapter Exception: ${error}`);
4179
+ done(error);
4180
+ }
4181
+ }).timeout(attemptTimeout);
4182
+ it('should error if - missing type', (done) => {
4183
+ try {
4184
+ a.getV2CustomersCustomerIdDomainsDomainActionsType('fakeparam', 'fakeparam', null, (data, error) => {
4185
+ try {
4186
+ const displayE = 'type is required';
4187
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getV2CustomersCustomerIdDomainsDomainActionsType', displayE);
4188
+ done();
4189
+ } catch (err) {
4190
+ log.error(`Test Failure: ${err}`);
4191
+ done(err);
4192
+ }
4193
+ });
4194
+ } catch (error) {
4195
+ log.error(`Adapter Exception: ${error}`);
4196
+ done(error);
4197
+ }
4198
+ }).timeout(attemptTimeout);
4199
+ });
4200
+
4201
+ describe('#getV2CustomersCustomerIdDomainsNotifications - errors', () => {
4202
+ it('should have a getV2CustomersCustomerIdDomainsNotifications function', (done) => {
4203
+ try {
4204
+ assert.equal(true, typeof a.getV2CustomersCustomerIdDomainsNotifications === 'function');
4205
+ done();
4206
+ } catch (error) {
4207
+ log.error(`Test Failure: ${error}`);
4208
+ done(error);
4209
+ }
4210
+ }).timeout(attemptTimeout);
4211
+ it('should error if - missing customerId', (done) => {
4212
+ try {
4213
+ a.getV2CustomersCustomerIdDomainsNotifications(null, (data, error) => {
4214
+ try {
4215
+ const displayE = 'customerId is required';
4216
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getV2CustomersCustomerIdDomainsNotifications', displayE);
4217
+ done();
4218
+ } catch (err) {
4219
+ log.error(`Test Failure: ${err}`);
4220
+ done(err);
4221
+ }
4222
+ });
4223
+ } catch (error) {
4224
+ log.error(`Adapter Exception: ${error}`);
4225
+ done(error);
4226
+ }
4227
+ }).timeout(attemptTimeout);
4228
+ });
4229
+
4230
+ describe('#getV2CustomersCustomerIdDomainsNotificationsOptIn - errors', () => {
4231
+ it('should have a getV2CustomersCustomerIdDomainsNotificationsOptIn function', (done) => {
4232
+ try {
4233
+ assert.equal(true, typeof a.getV2CustomersCustomerIdDomainsNotificationsOptIn === 'function');
4234
+ done();
4235
+ } catch (error) {
4236
+ log.error(`Test Failure: ${error}`);
4237
+ done(error);
4238
+ }
4239
+ }).timeout(attemptTimeout);
4240
+ it('should error if - missing customerId', (done) => {
4241
+ try {
4242
+ a.getV2CustomersCustomerIdDomainsNotificationsOptIn(null, (data, error) => {
4243
+ try {
4244
+ const displayE = 'customerId is required';
4245
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getV2CustomersCustomerIdDomainsNotificationsOptIn', displayE);
4246
+ done();
4247
+ } catch (err) {
4248
+ log.error(`Test Failure: ${err}`);
4249
+ done(err);
4250
+ }
4251
+ });
4252
+ } catch (error) {
4253
+ log.error(`Adapter Exception: ${error}`);
4254
+ done(error);
4255
+ }
4256
+ }).timeout(attemptTimeout);
4257
+ });
4258
+
4259
+ describe('#putV2CustomersCustomerIdDomainsNotificationsOptIn - errors', () => {
4260
+ it('should have a putV2CustomersCustomerIdDomainsNotificationsOptIn function', (done) => {
4261
+ try {
4262
+ assert.equal(true, typeof a.putV2CustomersCustomerIdDomainsNotificationsOptIn === 'function');
4263
+ done();
4264
+ } catch (error) {
4265
+ log.error(`Test Failure: ${error}`);
4266
+ done(error);
4267
+ }
4268
+ }).timeout(attemptTimeout);
4269
+ it('should error if - missing customerId', (done) => {
4270
+ try {
4271
+ a.putV2CustomersCustomerIdDomainsNotificationsOptIn(null, null, (data, error) => {
4272
+ try {
4273
+ const displayE = 'customerId is required';
4274
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-putV2CustomersCustomerIdDomainsNotificationsOptIn', displayE);
4275
+ done();
4276
+ } catch (err) {
4277
+ log.error(`Test Failure: ${err}`);
4278
+ done(err);
4279
+ }
4280
+ });
4281
+ } catch (error) {
4282
+ log.error(`Adapter Exception: ${error}`);
4283
+ done(error);
4284
+ }
4285
+ }).timeout(attemptTimeout);
4286
+ it('should error if - missing types', (done) => {
4287
+ try {
4288
+ a.putV2CustomersCustomerIdDomainsNotificationsOptIn('fakeparam', null, (data, error) => {
4289
+ try {
4290
+ const displayE = 'types is required';
4291
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-putV2CustomersCustomerIdDomainsNotificationsOptIn', displayE);
4292
+ done();
4293
+ } catch (err) {
4294
+ log.error(`Test Failure: ${err}`);
4295
+ done(err);
4296
+ }
4297
+ });
4298
+ } catch (error) {
4299
+ log.error(`Adapter Exception: ${error}`);
4300
+ done(error);
4301
+ }
4302
+ }).timeout(attemptTimeout);
4303
+ });
4304
+
4305
+ describe('#getV2CustomersCustomerIdDomainsNotificationsSchemasType - errors', () => {
4306
+ it('should have a getV2CustomersCustomerIdDomainsNotificationsSchemasType function', (done) => {
4307
+ try {
4308
+ assert.equal(true, typeof a.getV2CustomersCustomerIdDomainsNotificationsSchemasType === 'function');
4309
+ done();
4310
+ } catch (error) {
4311
+ log.error(`Test Failure: ${error}`);
4312
+ done(error);
4313
+ }
4314
+ }).timeout(attemptTimeout);
4315
+ it('should error if - missing customerId', (done) => {
4316
+ try {
4317
+ a.getV2CustomersCustomerIdDomainsNotificationsSchemasType(null, null, (data, error) => {
4318
+ try {
4319
+ const displayE = 'customerId is required';
4320
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getV2CustomersCustomerIdDomainsNotificationsSchemasType', displayE);
4321
+ done();
4322
+ } catch (err) {
4323
+ log.error(`Test Failure: ${err}`);
4324
+ done(err);
4325
+ }
4326
+ });
4327
+ } catch (error) {
4328
+ log.error(`Adapter Exception: ${error}`);
4329
+ done(error);
4330
+ }
4331
+ }).timeout(attemptTimeout);
4332
+ it('should error if - missing type', (done) => {
4333
+ try {
4334
+ a.getV2CustomersCustomerIdDomainsNotificationsSchemasType('fakeparam', null, (data, error) => {
4335
+ try {
4336
+ const displayE = 'type is required';
4337
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getV2CustomersCustomerIdDomainsNotificationsSchemasType', displayE);
4338
+ done();
4339
+ } catch (err) {
4340
+ log.error(`Test Failure: ${err}`);
4341
+ done(err);
4342
+ }
4343
+ });
4344
+ } catch (error) {
4345
+ log.error(`Adapter Exception: ${error}`);
4346
+ done(error);
4347
+ }
4348
+ }).timeout(attemptTimeout);
4349
+ });
4350
+
4351
+ describe('#postV2CustomersCustomerIdDomainsNotificationsNotificationIdAcknowledge - errors', () => {
4352
+ it('should have a postV2CustomersCustomerIdDomainsNotificationsNotificationIdAcknowledge function', (done) => {
4353
+ try {
4354
+ assert.equal(true, typeof a.postV2CustomersCustomerIdDomainsNotificationsNotificationIdAcknowledge === 'function');
4355
+ done();
4356
+ } catch (error) {
4357
+ log.error(`Test Failure: ${error}`);
4358
+ done(error);
4359
+ }
4360
+ }).timeout(attemptTimeout);
4361
+ it('should error if - missing customerId', (done) => {
4362
+ try {
4363
+ a.postV2CustomersCustomerIdDomainsNotificationsNotificationIdAcknowledge(null, null, (data, error) => {
4364
+ try {
4365
+ const displayE = 'customerId is required';
4366
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-postV2CustomersCustomerIdDomainsNotificationsNotificationIdAcknowledge', displayE);
4367
+ done();
4368
+ } catch (err) {
4369
+ log.error(`Test Failure: ${err}`);
4370
+ done(err);
4371
+ }
4372
+ });
4373
+ } catch (error) {
4374
+ log.error(`Adapter Exception: ${error}`);
4375
+ done(error);
4376
+ }
4377
+ }).timeout(attemptTimeout);
4378
+ it('should error if - missing notificationId', (done) => {
4379
+ try {
4380
+ a.postV2CustomersCustomerIdDomainsNotificationsNotificationIdAcknowledge('fakeparam', null, (data, error) => {
4381
+ try {
4382
+ const displayE = 'notificationId is required';
4383
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-postV2CustomersCustomerIdDomainsNotificationsNotificationIdAcknowledge', displayE);
4384
+ done();
4385
+ } catch (err) {
4386
+ log.error(`Test Failure: ${err}`);
4387
+ done(err);
4388
+ }
4389
+ });
4390
+ } catch (error) {
4391
+ log.error(`Adapter Exception: ${error}`);
4392
+ done(error);
4393
+ }
4394
+ }).timeout(attemptTimeout);
4395
+ });
4396
+
4397
+ describe('#listOrders - errors', () => {
4398
+ it('should have a listOrders function', (done) => {
4399
+ try {
4400
+ assert.equal(true, typeof a.listOrders === 'function');
4401
+ done();
4402
+ } catch (error) {
4403
+ log.error(`Test Failure: ${error}`);
4404
+ done(error);
4405
+ }
4406
+ }).timeout(attemptTimeout);
4407
+ });
4408
+
4409
+ describe('#get - errors', () => {
4410
+ it('should have a get function', (done) => {
4411
+ try {
4412
+ assert.equal(true, typeof a.get === 'function');
4413
+ done();
4414
+ } catch (error) {
4415
+ log.error(`Test Failure: ${error}`);
4416
+ done(error);
4417
+ }
4418
+ }).timeout(attemptTimeout);
4419
+ it('should error if - missing orderId', (done) => {
4420
+ try {
4421
+ a.get(null, (data, error) => {
4422
+ try {
4423
+ const displayE = 'orderId is required';
4424
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-get', displayE);
4425
+ done();
4426
+ } catch (err) {
4427
+ log.error(`Test Failure: ${err}`);
4428
+ done(err);
4429
+ }
4430
+ });
4431
+ } catch (error) {
4432
+ log.error(`Adapter Exception: ${error}`);
4433
+ done(error);
4434
+ }
4435
+ }).timeout(attemptTimeout);
4436
+ });
4437
+
4438
+ describe('#getMetrics - errors', () => {
4439
+ it('should have a getMetrics function', (done) => {
4440
+ try {
4441
+ assert.equal(true, typeof a.getMetrics === 'function');
4442
+ done();
4443
+ } catch (error) {
4444
+ log.error(`Test Failure: ${error}`);
4445
+ done(error);
4446
+ }
4447
+ }).timeout(attemptTimeout);
4448
+ it('should error if - missing customerId', (done) => {
4449
+ try {
4450
+ a.getMetrics(null, null, null, null, null, (data, error) => {
4451
+ try {
4452
+ const displayE = 'customerId is required';
4453
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getMetrics', displayE);
4454
+ done();
4455
+ } catch (err) {
4456
+ log.error(`Test Failure: ${err}`);
4457
+ done(err);
4458
+ }
4459
+ });
4460
+ } catch (error) {
4461
+ log.error(`Adapter Exception: ${error}`);
4462
+ done(error);
4463
+ }
4464
+ }).timeout(attemptTimeout);
4465
+ });
4466
+
4467
+ describe('#getMetricsByDomain - errors', () => {
4468
+ it('should have a getMetricsByDomain function', (done) => {
4469
+ try {
4470
+ assert.equal(true, typeof a.getMetricsByDomain === 'function');
4471
+ done();
4472
+ } catch (error) {
4473
+ log.error(`Test Failure: ${error}`);
4474
+ done(error);
4475
+ }
4476
+ }).timeout(attemptTimeout);
4477
+ it('should error if - missing customerId', (done) => {
4478
+ try {
4479
+ a.getMetricsByDomain(null, null, null, null, null, null, null, null, (data, error) => {
4480
+ try {
4481
+ const displayE = 'customerId is required';
4482
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getMetricsByDomain', displayE);
4483
+ done();
4484
+ } catch (err) {
4485
+ log.error(`Test Failure: ${err}`);
4486
+ done(err);
4487
+ }
4488
+ });
4489
+ } catch (error) {
4490
+ log.error(`Adapter Exception: ${error}`);
4491
+ done(error);
4492
+ }
4493
+ }).timeout(attemptTimeout);
4494
+ it('should error if - missing startDate', (done) => {
4495
+ try {
4496
+ a.getMetricsByDomain('fakeparam', null, null, null, null, null, null, null, (data, error) => {
4497
+ try {
4498
+ const displayE = 'startDate is required';
4499
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getMetricsByDomain', displayE);
4500
+ done();
4501
+ } catch (err) {
4502
+ log.error(`Test Failure: ${err}`);
4503
+ done(err);
4504
+ }
4505
+ });
4506
+ } catch (error) {
4507
+ log.error(`Adapter Exception: ${error}`);
4508
+ done(error);
4509
+ }
4510
+ }).timeout(attemptTimeout);
4511
+ it('should error if - missing endDate', (done) => {
4512
+ try {
4513
+ a.getMetricsByDomain('fakeparam', 'fakeparam', null, null, null, null, null, null, (data, error) => {
4514
+ try {
4515
+ const displayE = 'endDate is required';
4516
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getMetricsByDomain', displayE);
4517
+ done();
4518
+ } catch (err) {
4519
+ log.error(`Test Failure: ${err}`);
4520
+ done(err);
4521
+ }
4522
+ });
4523
+ } catch (error) {
4524
+ log.error(`Adapter Exception: ${error}`);
4525
+ done(error);
4526
+ }
4527
+ }).timeout(attemptTimeout);
4528
+ });
4529
+
4530
+ describe('#createSubaccount - errors', () => {
4531
+ it('should have a createSubaccount function', (done) => {
4532
+ try {
4533
+ assert.equal(true, typeof a.createSubaccount === 'function');
4534
+ done();
4535
+ } catch (error) {
4536
+ log.error(`Test Failure: ${error}`);
4537
+ done(error);
4538
+ }
4539
+ }).timeout(attemptTimeout);
4540
+ it('should error if - missing subaccount', (done) => {
4541
+ try {
4542
+ a.createSubaccount(null, (data, error) => {
4543
+ try {
4544
+ const displayE = 'subaccount is required';
4545
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-createSubaccount', displayE);
4546
+ done();
4547
+ } catch (err) {
4548
+ log.error(`Test Failure: ${err}`);
4549
+ done(err);
4550
+ }
4551
+ });
4552
+ } catch (error) {
4553
+ log.error(`Adapter Exception: ${error}`);
4554
+ done(error);
4555
+ }
4556
+ }).timeout(attemptTimeout);
4557
+ });
4558
+
4559
+ describe('#getShopper - errors', () => {
4560
+ it('should have a getShopper function', (done) => {
4561
+ try {
4562
+ assert.equal(true, typeof a.getShopper === 'function');
4563
+ done();
4564
+ } catch (error) {
4565
+ log.error(`Test Failure: ${error}`);
4566
+ done(error);
4567
+ }
4568
+ }).timeout(attemptTimeout);
4569
+ it('should error if - missing shopperId', (done) => {
4570
+ try {
4571
+ a.getShopper(null, null, (data, error) => {
4572
+ try {
4573
+ const displayE = 'shopperId is required';
4574
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getShopper', displayE);
4575
+ done();
4576
+ } catch (err) {
4577
+ log.error(`Test Failure: ${err}`);
4578
+ done(err);
4579
+ }
4580
+ });
4581
+ } catch (error) {
4582
+ log.error(`Adapter Exception: ${error}`);
4583
+ done(error);
4584
+ }
4585
+ }).timeout(attemptTimeout);
4586
+ });
4587
+
4588
+ describe('#updateShopper - errors', () => {
4589
+ it('should have a updateShopper function', (done) => {
4590
+ try {
4591
+ assert.equal(true, typeof a.updateShopper === 'function');
4592
+ done();
4593
+ } catch (error) {
4594
+ log.error(`Test Failure: ${error}`);
4595
+ done(error);
4596
+ }
4597
+ }).timeout(attemptTimeout);
4598
+ it('should error if - missing shopperId', (done) => {
4599
+ try {
4600
+ a.updateShopper(null, null, (data, error) => {
4601
+ try {
4602
+ const displayE = 'shopperId is required';
4603
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-updateShopper', displayE);
4604
+ done();
4605
+ } catch (err) {
4606
+ log.error(`Test Failure: ${err}`);
4607
+ done(err);
4608
+ }
4609
+ });
4610
+ } catch (error) {
4611
+ log.error(`Adapter Exception: ${error}`);
4612
+ done(error);
4613
+ }
4614
+ }).timeout(attemptTimeout);
4615
+ it('should error if - missing shopper', (done) => {
4616
+ try {
4617
+ a.updateShopper('fakeparam', null, (data, error) => {
4618
+ try {
4619
+ const displayE = 'shopper is required';
4620
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-updateShopper', displayE);
4621
+ done();
4622
+ } catch (err) {
4623
+ log.error(`Test Failure: ${err}`);
4624
+ done(err);
4625
+ }
4626
+ });
4627
+ } catch (error) {
4628
+ log.error(`Adapter Exception: ${error}`);
4629
+ done(error);
4630
+ }
4631
+ }).timeout(attemptTimeout);
4632
+ });
4633
+
4634
+ describe('#delete - errors', () => {
4635
+ it('should have a delete function', (done) => {
4636
+ try {
4637
+ assert.equal(true, typeof a.delete === 'function');
4638
+ done();
4639
+ } catch (error) {
4640
+ log.error(`Test Failure: ${error}`);
4641
+ done(error);
4642
+ }
4643
+ }).timeout(attemptTimeout);
4644
+ it('should error if - missing shopperId', (done) => {
4645
+ try {
4646
+ a.delete(null, null, (data, error) => {
4647
+ try {
4648
+ const displayE = 'shopperId is required';
4649
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-delete', displayE);
4650
+ done();
4651
+ } catch (err) {
4652
+ log.error(`Test Failure: ${err}`);
4653
+ done(err);
4654
+ }
4655
+ });
4656
+ } catch (error) {
4657
+ log.error(`Adapter Exception: ${error}`);
4658
+ done(error);
4659
+ }
4660
+ }).timeout(attemptTimeout);
4661
+ it('should error if - missing auditClientIp', (done) => {
4662
+ try {
4663
+ a.delete('fakeparam', null, (data, error) => {
4664
+ try {
4665
+ const displayE = 'auditClientIp is required';
4666
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-delete', displayE);
4667
+ done();
4668
+ } catch (err) {
4669
+ log.error(`Test Failure: ${err}`);
4670
+ done(err);
4671
+ }
4672
+ });
4673
+ } catch (error) {
4674
+ log.error(`Adapter Exception: ${error}`);
4675
+ done(error);
4676
+ }
4677
+ }).timeout(attemptTimeout);
4678
+ });
4679
+
4680
+ describe('#getStatus - errors', () => {
4681
+ it('should have a getStatus function', (done) => {
4682
+ try {
4683
+ assert.equal(true, typeof a.getStatus === 'function');
4684
+ done();
4685
+ } catch (error) {
4686
+ log.error(`Test Failure: ${error}`);
4687
+ done(error);
4688
+ }
4689
+ }).timeout(attemptTimeout);
4690
+ it('should error if - missing shopperId', (done) => {
4691
+ try {
4692
+ a.getStatus(null, null, (data, error) => {
4693
+ try {
4694
+ const displayE = 'shopperId is required';
4695
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getStatus', displayE);
4696
+ done();
4697
+ } catch (err) {
4698
+ log.error(`Test Failure: ${err}`);
4699
+ done(err);
4700
+ }
4701
+ });
4702
+ } catch (error) {
4703
+ log.error(`Adapter Exception: ${error}`);
4704
+ done(error);
4705
+ }
4706
+ }).timeout(attemptTimeout);
4707
+ it('should error if - missing auditClientIp', (done) => {
4708
+ try {
4709
+ a.getStatus('fakeparam', null, (data, error) => {
4710
+ try {
4711
+ const displayE = 'auditClientIp is required';
4712
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getStatus', displayE);
4713
+ done();
4714
+ } catch (err) {
4715
+ log.error(`Test Failure: ${err}`);
4716
+ done(err);
4717
+ }
4718
+ });
4719
+ } catch (error) {
4720
+ log.error(`Adapter Exception: ${error}`);
4721
+ done(error);
4722
+ }
4723
+ }).timeout(attemptTimeout);
4724
+ });
4725
+
4726
+ describe('#changePassword - errors', () => {
4727
+ it('should have a changePassword function', (done) => {
4728
+ try {
4729
+ assert.equal(true, typeof a.changePassword === 'function');
4730
+ done();
4731
+ } catch (error) {
4732
+ log.error(`Test Failure: ${error}`);
4733
+ done(error);
4734
+ }
4735
+ }).timeout(attemptTimeout);
4736
+ it('should error if - missing shopperId', (done) => {
4737
+ try {
4738
+ a.changePassword(null, null, (data, error) => {
4739
+ try {
4740
+ const displayE = 'shopperId is required';
4741
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-changePassword', displayE);
4742
+ done();
4743
+ } catch (err) {
4744
+ log.error(`Test Failure: ${err}`);
4745
+ done(err);
4746
+ }
4747
+ });
4748
+ } catch (error) {
4749
+ log.error(`Adapter Exception: ${error}`);
4750
+ done(error);
4751
+ }
4752
+ }).timeout(attemptTimeout);
4753
+ it('should error if - missing secret', (done) => {
4754
+ try {
4755
+ a.changePassword('fakeparam', null, (data, error) => {
4756
+ try {
4757
+ const displayE = 'secret is required';
4758
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-changePassword', displayE);
4759
+ done();
4760
+ } catch (err) {
4761
+ log.error(`Test Failure: ${err}`);
4762
+ done(err);
4763
+ }
4764
+ });
4765
+ } catch (error) {
4766
+ log.error(`Adapter Exception: ${error}`);
4767
+ done(error);
4768
+ }
4769
+ }).timeout(attemptTimeout);
4770
+ });
4771
+
4772
+ describe('#list - errors', () => {
4773
+ it('should have a list function', (done) => {
4774
+ try {
4775
+ assert.equal(true, typeof a.list === 'function');
4776
+ done();
4777
+ } catch (error) {
4778
+ log.error(`Test Failure: ${error}`);
4779
+ done(error);
4780
+ }
4781
+ }).timeout(attemptTimeout);
4782
+ });
4783
+
4784
+ describe('#productGroups - errors', () => {
4785
+ it('should have a productGroups function', (done) => {
4786
+ try {
4787
+ assert.equal(true, typeof a.productGroups === 'function');
4788
+ done();
4789
+ } catch (error) {
4790
+ log.error(`Test Failure: ${error}`);
4791
+ done(error);
4792
+ }
4793
+ }).timeout(attemptTimeout);
4794
+ });
4795
+
4796
+ describe('#cancelSubscription - errors', () => {
4797
+ it('should have a cancelSubscription function', (done) => {
4798
+ try {
4799
+ assert.equal(true, typeof a.cancelSubscription === 'function');
4800
+ done();
4801
+ } catch (error) {
4802
+ log.error(`Test Failure: ${error}`);
4803
+ done(error);
4804
+ }
4805
+ }).timeout(attemptTimeout);
4806
+ it('should error if - missing subscriptionId', (done) => {
4807
+ try {
4808
+ a.cancelSubscription(null, (data, error) => {
4809
+ try {
4810
+ const displayE = 'subscriptionId is required';
4811
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-cancelSubscription', displayE);
4812
+ done();
4813
+ } catch (err) {
4814
+ log.error(`Test Failure: ${err}`);
4815
+ done(err);
4816
+ }
4817
+ });
4818
+ } catch (error) {
4819
+ log.error(`Adapter Exception: ${error}`);
4820
+ done(error);
4821
+ }
4822
+ }).timeout(attemptTimeout);
4823
+ });
4824
+
4825
+ describe('#getSubscription - errors', () => {
4826
+ it('should have a getSubscription function', (done) => {
4827
+ try {
4828
+ assert.equal(true, typeof a.getSubscription === 'function');
4829
+ done();
4830
+ } catch (error) {
4831
+ log.error(`Test Failure: ${error}`);
4832
+ done(error);
4833
+ }
4834
+ }).timeout(attemptTimeout);
4835
+ it('should error if - missing subscriptionId', (done) => {
4836
+ try {
4837
+ a.getSubscription(null, (data, error) => {
4838
+ try {
4839
+ const displayE = 'subscriptionId is required';
4840
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-getSubscription', displayE);
4841
+ done();
4842
+ } catch (err) {
4843
+ log.error(`Test Failure: ${err}`);
4844
+ done(err);
4845
+ }
4846
+ });
4847
+ } catch (error) {
4848
+ log.error(`Adapter Exception: ${error}`);
4849
+ done(error);
4850
+ }
4851
+ }).timeout(attemptTimeout);
4852
+ });
4853
+
4854
+ describe('#updateSubscription - errors', () => {
4855
+ it('should have a updateSubscription function', (done) => {
4856
+ try {
4857
+ assert.equal(true, typeof a.updateSubscription === 'function');
4858
+ done();
4859
+ } catch (error) {
4860
+ log.error(`Test Failure: ${error}`);
4861
+ done(error);
4862
+ }
4863
+ }).timeout(attemptTimeout);
4864
+ it('should error if - missing subscriptionId', (done) => {
4865
+ try {
4866
+ a.updateSubscription(null, null, (data, error) => {
4867
+ try {
4868
+ const displayE = 'subscriptionId is required';
4869
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-updateSubscription', displayE);
4870
+ done();
4871
+ } catch (err) {
4872
+ log.error(`Test Failure: ${err}`);
4873
+ done(err);
4874
+ }
4875
+ });
4876
+ } catch (error) {
4877
+ log.error(`Adapter Exception: ${error}`);
4878
+ done(error);
4879
+ }
4880
+ }).timeout(attemptTimeout);
4881
+ it('should error if - missing subscription', (done) => {
4882
+ try {
4883
+ a.updateSubscription('fakeparam', null, (data, error) => {
4884
+ try {
4885
+ const displayE = 'subscription is required';
4886
+ runErrorAsserts(data, error, 'AD.300', 'Test-godaddy-adapter-updateSubscription', displayE);
4887
+ done();
4888
+ } catch (err) {
4889
+ log.error(`Test Failure: ${err}`);
4890
+ done(err);
4891
+ }
4892
+ });
4893
+ } catch (error) {
4894
+ log.error(`Adapter Exception: ${error}`);
4895
+ done(error);
4896
+ }
4897
+ }).timeout(attemptTimeout);
4898
+ });
4899
+ });
4900
+ });