@itentialopensource/adapter-gogetssl 0.1.1

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