@itentialopensource/adapter-amazon_route53 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 (51) 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 +7594 -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/20130401/action.json +1318 -0
  20. package/entities/20130401/schema.json +247 -0
  21. package/error.json +184 -0
  22. package/package.json +86 -0
  23. package/pronghorn.json +3445 -0
  24. package/propertiesSchema.json +840 -0
  25. package/refs?service=git-upload-pack +0 -0
  26. package/report/creationReport.json +492 -0
  27. package/report/route53-openapi.json-OpenApi3Json.json +15721 -0
  28. package/report/updateReport1646598657887.json +95 -0
  29. package/sampleProperties.json +106 -0
  30. package/test/integration/adapterTestBasicGet.js +85 -0
  31. package/test/integration/adapterTestConnectivity.js +93 -0
  32. package/test/integration/adapterTestIntegration.js +2453 -0
  33. package/test/unit/adapterBaseTestUnit.js +944 -0
  34. package/test/unit/adapterTestUnit.js +3446 -0
  35. package/utils/addAuth.js +94 -0
  36. package/utils/artifactize.js +146 -0
  37. package/utils/basicGet.js +50 -0
  38. package/utils/checkMigrate.js +63 -0
  39. package/utils/entitiesToDB.js +224 -0
  40. package/utils/findPath.js +74 -0
  41. package/utils/modify.js +154 -0
  42. package/utils/packModificationScript.js +35 -0
  43. package/utils/patches2bundledDeps.js +90 -0
  44. package/utils/pre-commit.sh +27 -0
  45. package/utils/removeHooks.js +20 -0
  46. package/utils/setup.js +33 -0
  47. package/utils/tbScript.js +169 -0
  48. package/utils/tbUtils.js +451 -0
  49. package/utils/testRunner.js +298 -0
  50. package/utils/troubleshootingAdapter.js +190 -0
  51. package/workflows/README.md +3 -0
@@ -0,0 +1,2453 @@
1
+ /* @copyright Itential, LLC 2019 (pre-modifications) */
2
+
3
+ // Set globals
4
+ /* global describe it log pronghornProps */
5
+ /* eslint no-unused-vars: warn */
6
+
7
+ // include required items for testing & logging
8
+ const assert = require('assert');
9
+ const fs = require('fs');
10
+ const mocha = require('mocha');
11
+ const path = require('path');
12
+ const winston = require('winston');
13
+ const { expect } = require('chai');
14
+ const { use } = require('chai');
15
+ const td = require('testdouble');
16
+ const util = require('util');
17
+ const pronghorn = require('../../pronghorn.json');
18
+
19
+ pronghorn.methodsByName = pronghorn.methods.reduce((result, meth) => ({ ...result, [meth.name]: meth }), {});
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 isSaveMockData = false;
27
+ const attemptTimeout = 5000;
28
+
29
+ // these variables can be changed to run in integrated mode so easier to set them here
30
+ // always check these in with bogus data!!!
31
+ const host = 'replace.hostorip.here';
32
+ const username = 'username';
33
+ const password = 'password';
34
+ const protocol = 'http';
35
+ const port = 80;
36
+ const sslenable = false;
37
+ const sslinvalid = false;
38
+
39
+ // these are the adapter properties. You generally should not need to alter
40
+ // any of these after they are initially set up
41
+ global.pronghornProps = {
42
+ pathProps: {
43
+ encrypted: false
44
+ },
45
+ adapterProps: {
46
+ adapters: [{
47
+ id: 'Test-amazon_route53',
48
+ type: 'AmazonRoute53',
49
+ properties: {
50
+ host,
51
+ port,
52
+ base_path: '/',
53
+ version: '',
54
+ cache_location: 'none',
55
+ encode_pathvars: true,
56
+ save_metric: false,
57
+ stub,
58
+ protocol,
59
+ authentication: {
60
+ auth_method: 'no_authentication',
61
+ username,
62
+ password,
63
+ token: '',
64
+ invalid_token_error: 401,
65
+ token_timeout: -1,
66
+ token_cache: 'local',
67
+ auth_field: 'header.headers.Authorization',
68
+ auth_field_format: 'Basic {b64}{username}:{password}{/b64}',
69
+ auth_logging: false,
70
+ client_id: '',
71
+ client_secret: '',
72
+ grant_type: ''
73
+ },
74
+ healthcheck: {
75
+ type: 'none',
76
+ frequency: 60000,
77
+ query_object: {}
78
+ },
79
+ throttle: {
80
+ throttle_enabled: false,
81
+ number_pronghorns: 1,
82
+ sync_async: 'sync',
83
+ max_in_queue: 1000,
84
+ concurrent_max: 1,
85
+ expire_timeout: 0,
86
+ avg_runtime: 200,
87
+ priorities: [
88
+ {
89
+ value: 0,
90
+ percent: 100
91
+ }
92
+ ]
93
+ },
94
+ request: {
95
+ number_redirects: 0,
96
+ number_retries: 3,
97
+ limit_retry_error: [0],
98
+ failover_codes: [],
99
+ attempt_timeout: attemptTimeout,
100
+ global_request: {
101
+ payload: {},
102
+ uriOptions: {},
103
+ addlHeaders: {},
104
+ authData: {}
105
+ },
106
+ healthcheck_on_timeout: true,
107
+ return_raw: true,
108
+ archiving: false,
109
+ return_request: false
110
+ },
111
+ proxy: {
112
+ enabled: false,
113
+ host: '',
114
+ port: 1,
115
+ protocol: 'http',
116
+ username: '',
117
+ password: ''
118
+ },
119
+ ssl: {
120
+ ecdhCurve: '',
121
+ enabled: sslenable,
122
+ accept_invalid_cert: sslinvalid,
123
+ ca_file: '',
124
+ key_file: '',
125
+ cert_file: '',
126
+ secure_protocol: '',
127
+ ciphers: ''
128
+ },
129
+ mongo: {
130
+ host: '',
131
+ port: 0,
132
+ database: '',
133
+ username: '',
134
+ password: '',
135
+ replSet: '',
136
+ db_ssl: {
137
+ enabled: false,
138
+ accept_invalid_cert: false,
139
+ ca_file: '',
140
+ key_file: '',
141
+ cert_file: ''
142
+ }
143
+ }
144
+ }
145
+ }]
146
+ }
147
+ };
148
+
149
+ global.$HOME = `${__dirname}/../..`;
150
+
151
+ // set the log levels that Pronghorn uses, spam and trace are not defaulted in so without
152
+ // this you may error on log.trace calls.
153
+ const myCustomLevels = {
154
+ levels: {
155
+ spam: 6,
156
+ trace: 5,
157
+ debug: 4,
158
+ info: 3,
159
+ warn: 2,
160
+ error: 1,
161
+ none: 0
162
+ }
163
+ };
164
+
165
+ // need to see if there is a log level passed in
166
+ process.argv.forEach((val) => {
167
+ // is there a log level defined to be passed in?
168
+ if (val.indexOf('--LOG') === 0) {
169
+ // get the desired log level
170
+ const inputVal = val.split('=')[1];
171
+
172
+ // validate the log level is supported, if so set it
173
+ if (Object.hasOwnProperty.call(myCustomLevels.levels, inputVal)) {
174
+ logLevel = inputVal;
175
+ }
176
+ }
177
+ });
178
+
179
+ // need to set global logging
180
+ global.log = winston.createLogger({
181
+ level: logLevel,
182
+ levels: myCustomLevels.levels,
183
+ transports: [
184
+ new winston.transports.Console()
185
+ ]
186
+ });
187
+
188
+ /**
189
+ * Runs the common asserts for test
190
+ */
191
+ function runCommonAsserts(data, error) {
192
+ assert.equal(undefined, error);
193
+ assert.notEqual(undefined, data);
194
+ assert.notEqual(null, data);
195
+ assert.notEqual(undefined, data.response);
196
+ assert.notEqual(null, data.response);
197
+ }
198
+
199
+ /**
200
+ * Runs the error asserts for the test
201
+ */
202
+ function runErrorAsserts(data, error, code, origin, displayStr) {
203
+ assert.equal(null, data);
204
+ assert.notEqual(undefined, error);
205
+ assert.notEqual(null, error);
206
+ assert.notEqual(undefined, error.IAPerror);
207
+ assert.notEqual(null, error.IAPerror);
208
+ assert.notEqual(undefined, error.IAPerror.displayString);
209
+ assert.notEqual(null, error.IAPerror.displayString);
210
+ assert.equal(code, error.icode);
211
+ assert.equal(origin, error.IAPerror.origin);
212
+ assert.equal(displayStr, error.IAPerror.displayString);
213
+ }
214
+
215
+ /**
216
+ * @function saveMockData
217
+ * Attempts to take data from responses and place them in MockDataFiles to help create Mockdata.
218
+ * Note, this was built based on entity file structure for Adapter-Engine 1.6.x
219
+ * @param {string} entityName - Name of the entity saving mock data for
220
+ * @param {string} actionName - Name of the action saving mock data for
221
+ * @param {string} descriptor - Something to describe this test (used as a type)
222
+ * @param {string or object} responseData - The data to put in the mock file.
223
+ */
224
+ function saveMockData(entityName, actionName, descriptor, responseData) {
225
+ // do not need to save mockdata if we are running in stub mode (already has mock data) or if told not to save
226
+ if (stub || !isSaveMockData) {
227
+ return false;
228
+ }
229
+
230
+ // must have a response in order to store the response
231
+ if (responseData && responseData.response) {
232
+ let data = responseData.response;
233
+
234
+ // if there was a raw response that one is better as it is untranslated
235
+ if (responseData.raw) {
236
+ data = responseData.raw;
237
+
238
+ try {
239
+ const temp = JSON.parse(data);
240
+ data = temp;
241
+ } catch (pex) {
242
+ // do not care if it did not parse as we will just use data
243
+ }
244
+ }
245
+
246
+ try {
247
+ const base = path.join(__dirname, `../../entities/${entityName}/`);
248
+ const mockdatafolder = 'mockdatafiles';
249
+ const filename = `mockdatafiles/${actionName}-${descriptor}.json`;
250
+
251
+ if (!fs.existsSync(base + mockdatafolder)) {
252
+ fs.mkdirSync(base + mockdatafolder);
253
+ }
254
+
255
+ // write the data we retrieved
256
+ fs.writeFile(base + filename, JSON.stringify(data, null, 2), 'utf8', (errWritingMock) => {
257
+ if (errWritingMock) throw errWritingMock;
258
+
259
+ // update the action file to reflect the changes. Note: We're replacing the default object for now!
260
+ fs.readFile(`${base}action.json`, (errRead, content) => {
261
+ if (errRead) throw errRead;
262
+
263
+ // parse the action file into JSON
264
+ const parsedJson = JSON.parse(content);
265
+
266
+ // The object update we'll write in.
267
+ const responseObj = {
268
+ type: descriptor,
269
+ key: '',
270
+ mockFile: filename
271
+ };
272
+
273
+ // get the object for method we're trying to change.
274
+ const currentMethodAction = parsedJson.actions.find((obj) => obj.name === actionName);
275
+
276
+ // if the method was not found - should never happen but...
277
+ if (!currentMethodAction) {
278
+ throw Error('Can\'t find an action for this method in the provided entity.');
279
+ }
280
+
281
+ // if there is a response object, we want to replace the Response object. Otherwise we'll create one.
282
+ const actionResponseObj = currentMethodAction.responseObjects.find((obj) => obj.type === descriptor);
283
+
284
+ // Add the action responseObj back into the array of response objects.
285
+ if (!actionResponseObj) {
286
+ // if there is a default response object, we want to get the key.
287
+ const defaultResponseObj = currentMethodAction.responseObjects.find((obj) => obj.type === 'default');
288
+
289
+ // save the default key into the new response object
290
+ if (defaultResponseObj) {
291
+ responseObj.key = defaultResponseObj.key;
292
+ }
293
+
294
+ // save the new response object
295
+ currentMethodAction.responseObjects = [responseObj];
296
+ } else {
297
+ // update the location of the mock data file
298
+ actionResponseObj.mockFile = responseObj.mockFile;
299
+ }
300
+
301
+ // Save results
302
+ fs.writeFile(`${base}action.json`, JSON.stringify(parsedJson, null, 2), (err) => {
303
+ if (err) throw err;
304
+ });
305
+ });
306
+ });
307
+ } catch (e) {
308
+ log.debug(`Failed to save mock data for ${actionName}. ${e.message}`);
309
+ return false;
310
+ }
311
+ }
312
+
313
+ // no response to save
314
+ log.debug(`No data passed to save into mockdata for ${actionName}`);
315
+ return false;
316
+ }
317
+
318
+ // require the adapter that we are going to be using
319
+ const AmazonRoute53 = require('../../adapter');
320
+
321
+ // begin the testing - these should be pretty well defined between the describe and the it!
322
+ describe('[integration] Amazon_route53 Adapter Test', () => {
323
+ describe('AmazonRoute53 Class Tests', () => {
324
+ const a = new AmazonRoute53(
325
+ pronghornProps.adapterProps.adapters[0].id,
326
+ pronghornProps.adapterProps.adapters[0].properties
327
+ );
328
+
329
+ if (isRapidFail) {
330
+ const state = {};
331
+ state.passed = true;
332
+
333
+ mocha.afterEach(function x() {
334
+ state.passed = state.passed
335
+ && (this.currentTest.state === 'passed');
336
+ });
337
+ mocha.beforeEach(function x() {
338
+ if (!state.passed) {
339
+ return this.currentTest.skip();
340
+ }
341
+ return true;
342
+ });
343
+ }
344
+
345
+ describe('#class instance created', () => {
346
+ it('should be a class with properties', (done) => {
347
+ try {
348
+ assert.notEqual(null, a);
349
+ assert.notEqual(undefined, a);
350
+ const checkId = global.pronghornProps.adapterProps.adapters[0].id;
351
+ assert.equal(checkId, a.id);
352
+ assert.notEqual(null, a.allProps);
353
+ const check = global.pronghornProps.adapterProps.adapters[0].properties.healthcheck.type;
354
+ assert.equal(check, a.healthcheckType);
355
+ done();
356
+ } catch (error) {
357
+ log.error(`Test Failure: ${error}`);
358
+ done(error);
359
+ }
360
+ }).timeout(attemptTimeout);
361
+ });
362
+
363
+ describe('#connect', () => {
364
+ it('should get connected - no healthcheck', (done) => {
365
+ try {
366
+ a.healthcheckType = 'none';
367
+ a.connect();
368
+
369
+ try {
370
+ assert.equal(true, a.alive);
371
+ done();
372
+ } catch (error) {
373
+ log.error(`Test Failure: ${error}`);
374
+ done(error);
375
+ }
376
+ } catch (error) {
377
+ log.error(`Adapter Exception: ${error}`);
378
+ done(error);
379
+ }
380
+ });
381
+ it('should get connected - startup healthcheck', (done) => {
382
+ try {
383
+ a.healthcheckType = 'startup';
384
+ a.connect();
385
+
386
+ try {
387
+ assert.equal(true, a.alive);
388
+ done();
389
+ } catch (error) {
390
+ log.error(`Test Failure: ${error}`);
391
+ done(error);
392
+ }
393
+ } catch (error) {
394
+ log.error(`Adapter Exception: ${error}`);
395
+ done(error);
396
+ }
397
+ });
398
+ });
399
+
400
+ describe('#healthCheck', () => {
401
+ it('should be healthy', (done) => {
402
+ try {
403
+ a.healthCheck(null, (data) => {
404
+ try {
405
+ assert.equal(true, a.healthy);
406
+ saveMockData('system', 'healthcheck', 'default', data);
407
+ done();
408
+ } catch (err) {
409
+ log.error(`Test Failure: ${err}`);
410
+ done(err);
411
+ }
412
+ });
413
+ } catch (error) {
414
+ log.error(`Adapter Exception: ${error}`);
415
+ done(error);
416
+ }
417
+ }).timeout(attemptTimeout);
418
+ });
419
+
420
+ /*
421
+ -----------------------------------------------------------------------
422
+ -----------------------------------------------------------------------
423
+ *** All code above this comment will be replaced during a migration ***
424
+ ******************* DO NOT REMOVE THIS COMMENT BLOCK ******************
425
+ -----------------------------------------------------------------------
426
+ -----------------------------------------------------------------------
427
+ */
428
+ let skipCount = 0;
429
+
430
+ const CreateReusableDelegationSetBodyParam = '<xml>fakedata</xml>';
431
+ describe('#createReusableDelegationSet - errors', () => {
432
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
433
+ if (pronghorn.methodsByName.createReusableDelegationSet.task) {
434
+ try {
435
+ a.createReusableDelegationSet(CreateReusableDelegationSetBodyParam, (data, error) => {
436
+ try {
437
+ if (stub) {
438
+ const displayE = 'Error 400 received on request';
439
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
440
+ } else {
441
+ runCommonAsserts(data, error);
442
+ }
443
+ saveMockData('20130401', 'createReusableDelegationSet', 'default', data);
444
+ done();
445
+ } catch (err) {
446
+ log.error(`Test Failure: ${err}`);
447
+ done(err);
448
+ }
449
+ });
450
+ } catch (error) {
451
+ log.error(`Adapter Exception: ${error}`);
452
+ done(error);
453
+ }
454
+ } else {
455
+ log.error('createReusableDelegationSet task is false, skipping test');
456
+ skipCount += 1;
457
+ done();
458
+ }// end if task
459
+ }).timeout(attemptTimeout);
460
+ });
461
+
462
+ const CreateHealthCheckBodyParam = '<xml>fakedata</xml>';
463
+ describe('#createHealthCheck - errors', () => {
464
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
465
+ if (pronghorn.methodsByName.createHealthCheck.task) {
466
+ try {
467
+ a.createHealthCheck(CreateHealthCheckBodyParam, (data, error) => {
468
+ try {
469
+ if (stub) {
470
+ const displayE = 'Error 400 received on request';
471
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
472
+ } else {
473
+ runCommonAsserts(data, error);
474
+ }
475
+ saveMockData('20130401', 'createHealthCheck', 'default', data);
476
+ done();
477
+ } catch (err) {
478
+ log.error(`Test Failure: ${err}`);
479
+ done(err);
480
+ }
481
+ });
482
+ } catch (error) {
483
+ log.error(`Adapter Exception: ${error}`);
484
+ done(error);
485
+ }
486
+ } else {
487
+ log.error('createHealthCheck task is false, skipping test');
488
+ skipCount += 1;
489
+ done();
490
+ }// end if task
491
+ }).timeout(attemptTimeout);
492
+ });
493
+
494
+ const HealthCheckId = 'fakedata';
495
+ const UpdateHealthCheckBodyParam = '<xml>fakedata</xml>';
496
+ describe('#updateHealthCheck - errors', () => {
497
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
498
+ if (pronghorn.methodsByName.updateHealthCheck.task) {
499
+ try {
500
+ a.updateHealthCheck(HealthCheckId, UpdateHealthCheckBodyParam, (data, error) => {
501
+ try {
502
+ if (stub) {
503
+ const displayE = 'Error 400 received on request';
504
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
505
+ } else {
506
+ runCommonAsserts(data, error);
507
+ }
508
+ saveMockData('20130401', 'updateHealthCheck', 'default', data);
509
+ done();
510
+ } catch (err) {
511
+ log.error(`Test Failure: ${err}`);
512
+ done(err);
513
+ }
514
+ });
515
+ } catch (error) {
516
+ log.error(`Adapter Exception: ${error}`);
517
+ done(error);
518
+ }
519
+ } else {
520
+ log.error('updateHealthCheck task is false, skipping test');
521
+ skipCount += 1;
522
+ done();
523
+ }// end if task
524
+ }).timeout(attemptTimeout);
525
+ });
526
+
527
+ const CreateHostedZoneBodyParam = '<xml>fakedata</xml>';
528
+ describe('#createHostedZone - errors', () => {
529
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
530
+ if (pronghorn.methodsByName.createHostedZone.task) {
531
+ try {
532
+ a.createHostedZone(CreateHostedZoneBodyParam, (data, error) => {
533
+ try {
534
+ if (stub) {
535
+ const displayE = 'Error 400 received on request';
536
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
537
+ } else {
538
+ runCommonAsserts(data, error);
539
+ }
540
+ saveMockData('20130401', 'createHostedZone', 'default', data);
541
+ done();
542
+ } catch (err) {
543
+ log.error(`Test Failure: ${err}`);
544
+ done(err);
545
+ }
546
+ });
547
+ } catch (error) {
548
+ log.error(`Adapter Exception: ${error}`);
549
+ done(error);
550
+ }
551
+ } else {
552
+ log.error('createHostedZone task is false, skipping test');
553
+ skipCount += 1;
554
+ done();
555
+ }// end if task
556
+ }).timeout(attemptTimeout);
557
+ });
558
+
559
+ const Id = 'fakedata';
560
+ const UpdateHostedZoneCommentBodyParam = '<xml>fakedata</xml>';
561
+ describe('#updateHostedZoneComment - errors', () => {
562
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
563
+ if (pronghorn.methodsByName.updateHostedZoneComment.task) {
564
+ try {
565
+ a.updateHostedZoneComment(Id, UpdateHostedZoneCommentBodyParam, (data, error) => {
566
+ try {
567
+ if (stub) {
568
+ const displayE = 'Error 400 received on request';
569
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
570
+ } else {
571
+ runCommonAsserts(data, error);
572
+ }
573
+ saveMockData('20130401', 'updateHostedZoneComment', 'default', data);
574
+ done();
575
+ } catch (err) {
576
+ log.error(`Test Failure: ${err}`);
577
+ done(err);
578
+ }
579
+ });
580
+ } catch (error) {
581
+ log.error(`Adapter Exception: ${error}`);
582
+ done(error);
583
+ }
584
+ } else {
585
+ log.error('updateHostedZoneComment task is false, skipping test');
586
+ skipCount += 1;
587
+ done();
588
+ }// end if task
589
+ }).timeout(attemptTimeout);
590
+ });
591
+
592
+ const AssociateVPCWithHostedZoneBodyParam = '<xml>fakedata</xml>';
593
+ describe('#associateVPCWithHostedZone - errors', () => {
594
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
595
+ if (pronghorn.methodsByName.associateVPCWithHostedZone.task) {
596
+ try {
597
+ a.associateVPCWithHostedZone(Id, AssociateVPCWithHostedZoneBodyParam, (data, error) => {
598
+ try {
599
+ if (stub) {
600
+ const displayE = 'Error 400 received on request';
601
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
602
+ } else {
603
+ runCommonAsserts(data, error);
604
+ }
605
+ saveMockData('20130401', 'associateVPCWithHostedZone', 'default', data);
606
+ done();
607
+ } catch (err) {
608
+ log.error(`Test Failure: ${err}`);
609
+ done(err);
610
+ }
611
+ });
612
+ } catch (error) {
613
+ log.error(`Adapter Exception: ${error}`);
614
+ done(error);
615
+ }
616
+ } else {
617
+ log.error('associateVPCWithHostedZone task is false, skipping test');
618
+ skipCount += 1;
619
+ done();
620
+ }// end if task
621
+ }).timeout(attemptTimeout);
622
+ });
623
+
624
+ const CreateVPCAssociationAuthorizationBodyParam = '<xml>fakedata</xml>';
625
+ describe('#createVPCAssociationAuthorization - errors', () => {
626
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
627
+ if (pronghorn.methodsByName.createVPCAssociationAuthorization.task) {
628
+ try {
629
+ a.createVPCAssociationAuthorization(Id, CreateVPCAssociationAuthorizationBodyParam, (data, error) => {
630
+ try {
631
+ if (stub) {
632
+ const displayE = 'Error 400 received on request';
633
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
634
+ } else {
635
+ runCommonAsserts(data, error);
636
+ }
637
+ saveMockData('20130401', 'createVPCAssociationAuthorization', 'default', data);
638
+ done();
639
+ } catch (err) {
640
+ log.error(`Test Failure: ${err}`);
641
+ done(err);
642
+ }
643
+ });
644
+ } catch (error) {
645
+ log.error(`Adapter Exception: ${error}`);
646
+ done(error);
647
+ }
648
+ } else {
649
+ log.error('createVPCAssociationAuthorization task is false, skipping test');
650
+ skipCount += 1;
651
+ done();
652
+ }// end if task
653
+ }).timeout(attemptTimeout);
654
+ });
655
+
656
+ const DeleteVPCAssociationAuthorizationBodyParam = '<xml>fakedata</xml>';
657
+ describe('#deleteVPCAssociationAuthorization - errors', () => {
658
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
659
+ if (pronghorn.methodsByName.deleteVPCAssociationAuthorization.task) {
660
+ try {
661
+ a.deleteVPCAssociationAuthorization(Id, DeleteVPCAssociationAuthorizationBodyParam, (data, error) => {
662
+ try {
663
+ if (stub) {
664
+ const displayE = 'Error 400 received on request';
665
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
666
+ } else {
667
+ runCommonAsserts(data, error);
668
+ }
669
+ saveMockData('20130401', 'deleteVPCAssociationAuthorization', 'default', data);
670
+ done();
671
+ } catch (err) {
672
+ log.error(`Test Failure: ${err}`);
673
+ done(err);
674
+ }
675
+ });
676
+ } catch (error) {
677
+ log.error(`Adapter Exception: ${error}`);
678
+ done(error);
679
+ }
680
+ } else {
681
+ log.error('deleteVPCAssociationAuthorization task is false, skipping test');
682
+ skipCount += 1;
683
+ done();
684
+ }// end if task
685
+ }).timeout(attemptTimeout);
686
+ });
687
+
688
+ describe('#disableHostedZoneDNSSEC - errors', () => {
689
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
690
+ if (pronghorn.methodsByName.disableHostedZoneDNSSEC.task) {
691
+ try {
692
+ a.disableHostedZoneDNSSEC(Id, (data, error) => {
693
+ try {
694
+ if (stub) {
695
+ const displayE = 'Error 400 received on request';
696
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
697
+ } else {
698
+ runCommonAsserts(data, error);
699
+ }
700
+ saveMockData('20130401', 'disableHostedZoneDNSSEC', 'default', data);
701
+ done();
702
+ } catch (err) {
703
+ log.error(`Test Failure: ${err}`);
704
+ done(err);
705
+ }
706
+ });
707
+ } catch (error) {
708
+ log.error(`Adapter Exception: ${error}`);
709
+ done(error);
710
+ }
711
+ } else {
712
+ log.error('disableHostedZoneDNSSEC task is false, skipping test');
713
+ skipCount += 1;
714
+ done();
715
+ }// end if task
716
+ }).timeout(attemptTimeout);
717
+ });
718
+
719
+ const DisassociateVPCFromHostedZoneBodyParam = '<xml>fakedata</xml>';
720
+ describe('#disassociateVPCFromHostedZone - errors', () => {
721
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
722
+ if (pronghorn.methodsByName.disassociateVPCFromHostedZone.task) {
723
+ try {
724
+ a.disassociateVPCFromHostedZone(Id, DisassociateVPCFromHostedZoneBodyParam, (data, error) => {
725
+ try {
726
+ if (stub) {
727
+ const displayE = 'Error 400 received on request';
728
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
729
+ } else {
730
+ runCommonAsserts(data, error);
731
+ }
732
+ saveMockData('20130401', 'disassociateVPCFromHostedZone', 'default', data);
733
+ done();
734
+ } catch (err) {
735
+ log.error(`Test Failure: ${err}`);
736
+ done(err);
737
+ }
738
+ });
739
+ } catch (error) {
740
+ log.error(`Adapter Exception: ${error}`);
741
+ done(error);
742
+ }
743
+ } else {
744
+ log.error('disassociateVPCFromHostedZone task is false, skipping test');
745
+ skipCount += 1;
746
+ done();
747
+ }// end if task
748
+ }).timeout(attemptTimeout);
749
+ });
750
+
751
+ describe('#enableHostedZoneDNSSEC - errors', () => {
752
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
753
+ if (pronghorn.methodsByName.enableHostedZoneDNSSEC.task) {
754
+ try {
755
+ a.enableHostedZoneDNSSEC(Id, (data, error) => {
756
+ try {
757
+ if (stub) {
758
+ const displayE = 'Error 400 received on request';
759
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
760
+ } else {
761
+ runCommonAsserts(data, error);
762
+ }
763
+ saveMockData('20130401', 'enableHostedZoneDNSSEC', 'default', data);
764
+ done();
765
+ } catch (err) {
766
+ log.error(`Test Failure: ${err}`);
767
+ done(err);
768
+ }
769
+ });
770
+ } catch (error) {
771
+ log.error(`Adapter Exception: ${error}`);
772
+ done(error);
773
+ }
774
+ } else {
775
+ log.error('enableHostedZoneDNSSEC task is false, skipping test');
776
+ skipCount += 1;
777
+ done();
778
+ }// end if task
779
+ }).timeout(attemptTimeout);
780
+ });
781
+
782
+ const ChangeResourceRecordSetsBodyParam = '<xml>fakedata</xml>';
783
+ describe('#changeResourceRecordSets - errors', () => {
784
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
785
+ if (pronghorn.methodsByName.changeResourceRecordSets.task) {
786
+ try {
787
+ a.changeResourceRecordSets(Id, ChangeResourceRecordSetsBodyParam, (data, error) => {
788
+ try {
789
+ if (stub) {
790
+ const displayE = 'Error 400 received on request';
791
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
792
+ } else {
793
+ runCommonAsserts(data, error);
794
+ }
795
+ saveMockData('20130401', 'changeResourceRecordSets', 'default', data);
796
+ done();
797
+ } catch (err) {
798
+ log.error(`Test Failure: ${err}`);
799
+ done(err);
800
+ }
801
+ });
802
+ } catch (error) {
803
+ log.error(`Adapter Exception: ${error}`);
804
+ done(error);
805
+ }
806
+ } else {
807
+ log.error('changeResourceRecordSets task is false, skipping test');
808
+ skipCount += 1;
809
+ done();
810
+ }// end if task
811
+ }).timeout(attemptTimeout);
812
+ });
813
+
814
+ const CreateKeySigningKeyBodyParam = '<xml>fakedata</xml>';
815
+ describe('#createKeySigningKey - errors', () => {
816
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
817
+ if (pronghorn.methodsByName.createKeySigningKey.task) {
818
+ try {
819
+ a.createKeySigningKey(CreateKeySigningKeyBodyParam, (data, error) => {
820
+ try {
821
+ if (stub) {
822
+ const displayE = 'Error 400 received on request';
823
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
824
+ } else {
825
+ runCommonAsserts(data, error);
826
+ }
827
+ saveMockData('20130401', 'createKeySigningKey', 'default', data);
828
+ done();
829
+ } catch (err) {
830
+ log.error(`Test Failure: ${err}`);
831
+ done(err);
832
+ }
833
+ });
834
+ } catch (error) {
835
+ log.error(`Adapter Exception: ${error}`);
836
+ done(error);
837
+ }
838
+ } else {
839
+ log.error('createKeySigningKey task is false, skipping test');
840
+ skipCount += 1;
841
+ done();
842
+ }// end if task
843
+ }).timeout(attemptTimeout);
844
+ });
845
+
846
+ const HostedZoneId = 'fakedata';
847
+ const Name = 'fakedata';
848
+ describe('#activateKeySigningKey - errors', () => {
849
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
850
+ if (pronghorn.methodsByName.activateKeySigningKey.task) {
851
+ try {
852
+ a.activateKeySigningKey(HostedZoneId, Name, (data, error) => {
853
+ try {
854
+ if (stub) {
855
+ const displayE = 'Error 400 received on request';
856
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
857
+ } else {
858
+ runCommonAsserts(data, error);
859
+ }
860
+ saveMockData('20130401', 'activateKeySigningKey', 'default', data);
861
+ done();
862
+ } catch (err) {
863
+ log.error(`Test Failure: ${err}`);
864
+ done(err);
865
+ }
866
+ });
867
+ } catch (error) {
868
+ log.error(`Adapter Exception: ${error}`);
869
+ done(error);
870
+ }
871
+ } else {
872
+ log.error('activateKeySigningKey task is false, skipping test');
873
+ skipCount += 1;
874
+ done();
875
+ }// end if task
876
+ }).timeout(attemptTimeout);
877
+ });
878
+
879
+ describe('#deactivateKeySigningKey - errors', () => {
880
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
881
+ if (pronghorn.methodsByName.deactivateKeySigningKey.task) {
882
+ try {
883
+ a.deactivateKeySigningKey(HostedZoneId, Name, (data, error) => {
884
+ try {
885
+ if (stub) {
886
+ const displayE = 'Error 400 received on request';
887
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
888
+ } else {
889
+ runCommonAsserts(data, error);
890
+ }
891
+ saveMockData('20130401', 'deactivateKeySigningKey', 'default', data);
892
+ done();
893
+ } catch (err) {
894
+ log.error(`Test Failure: ${err}`);
895
+ done(err);
896
+ }
897
+ });
898
+ } catch (error) {
899
+ log.error(`Adapter Exception: ${error}`);
900
+ done(error);
901
+ }
902
+ } else {
903
+ log.error('deactivateKeySigningKey task is false, skipping test');
904
+ skipCount += 1;
905
+ done();
906
+ }// end if task
907
+ }).timeout(attemptTimeout);
908
+ });
909
+
910
+ const CreateQueryLoggingConfigBodyParam = '<xml>fakedata</xml>';
911
+ describe('#createQueryLoggingConfig - errors', () => {
912
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
913
+ if (pronghorn.methodsByName.createQueryLoggingConfig.task) {
914
+ try {
915
+ a.createQueryLoggingConfig(CreateQueryLoggingConfigBodyParam, (data, error) => {
916
+ try {
917
+ if (stub) {
918
+ const displayE = 'Error 400 received on request';
919
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
920
+ } else {
921
+ runCommonAsserts(data, error);
922
+ }
923
+ saveMockData('20130401', 'createQueryLoggingConfig', 'default', data);
924
+ done();
925
+ } catch (err) {
926
+ log.error(`Test Failure: ${err}`);
927
+ done(err);
928
+ }
929
+ });
930
+ } catch (error) {
931
+ log.error(`Adapter Exception: ${error}`);
932
+ done(error);
933
+ }
934
+ } else {
935
+ log.error('createQueryLoggingConfig task is false, skipping test');
936
+ skipCount += 1;
937
+ done();
938
+ }// end if task
939
+ }).timeout(attemptTimeout);
940
+ });
941
+
942
+ const ResourceType = 'fakedata';
943
+ const ListTagsForResourcesBodyParam = '<xml>fakedata</xml>';
944
+ describe('#listTagsForResources - errors', () => {
945
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
946
+ if (pronghorn.methodsByName.listTagsForResources.task) {
947
+ try {
948
+ a.listTagsForResources(ResourceType, ListTagsForResourcesBodyParam, (data, error) => {
949
+ try {
950
+ if (stub) {
951
+ const displayE = 'Error 400 received on request';
952
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
953
+ } else {
954
+ runCommonAsserts(data, error);
955
+ }
956
+ saveMockData('20130401', 'listTagsForResources', 'default', data);
957
+ done();
958
+ } catch (err) {
959
+ log.error(`Test Failure: ${err}`);
960
+ done(err);
961
+ }
962
+ });
963
+ } catch (error) {
964
+ log.error(`Adapter Exception: ${error}`);
965
+ done(error);
966
+ }
967
+ } else {
968
+ log.error('listTagsForResources task is false, skipping test');
969
+ skipCount += 1;
970
+ done();
971
+ }// end if task
972
+ }).timeout(attemptTimeout);
973
+ });
974
+
975
+ const ResourceId = 'fakedata';
976
+ const ChangeTagsForResourceBodyParam = '<xml>fakedata</xml>';
977
+ describe('#changeTagsForResource - errors', () => {
978
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
979
+ if (pronghorn.methodsByName.changeTagsForResource.task) {
980
+ try {
981
+ a.changeTagsForResource(ResourceType, ResourceId, ChangeTagsForResourceBodyParam, (data, error) => {
982
+ try {
983
+ if (stub) {
984
+ const displayE = 'Error 400 received on request';
985
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
986
+ } else {
987
+ runCommonAsserts(data, error);
988
+ }
989
+ saveMockData('20130401', 'changeTagsForResource', 'default', data);
990
+ done();
991
+ } catch (err) {
992
+ log.error(`Test Failure: ${err}`);
993
+ done(err);
994
+ }
995
+ });
996
+ } catch (error) {
997
+ log.error(`Adapter Exception: ${error}`);
998
+ done(error);
999
+ }
1000
+ } else {
1001
+ log.error('changeTagsForResource task is false, skipping test');
1002
+ skipCount += 1;
1003
+ done();
1004
+ }// end if task
1005
+ }).timeout(attemptTimeout);
1006
+ });
1007
+
1008
+ const CreateTrafficPolicyBodyParam = '<xml>fakedata</xml>';
1009
+ describe('#createTrafficPolicy - errors', () => {
1010
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1011
+ if (pronghorn.methodsByName.createTrafficPolicy.task) {
1012
+ try {
1013
+ a.createTrafficPolicy(CreateTrafficPolicyBodyParam, (data, error) => {
1014
+ try {
1015
+ if (stub) {
1016
+ const displayE = 'Error 400 received on request';
1017
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
1018
+ } else {
1019
+ runCommonAsserts(data, error);
1020
+ }
1021
+ saveMockData('20130401', 'createTrafficPolicy', 'default', data);
1022
+ done();
1023
+ } catch (err) {
1024
+ log.error(`Test Failure: ${err}`);
1025
+ done(err);
1026
+ }
1027
+ });
1028
+ } catch (error) {
1029
+ log.error(`Adapter Exception: ${error}`);
1030
+ done(error);
1031
+ }
1032
+ } else {
1033
+ log.error('createTrafficPolicy task is false, skipping test');
1034
+ skipCount += 1;
1035
+ done();
1036
+ }// end if task
1037
+ }).timeout(attemptTimeout);
1038
+ });
1039
+
1040
+ const CreateTrafficPolicyVersionBodyParam = '<xml>fakedata</xml>';
1041
+ describe('#createTrafficPolicyVersion - errors', () => {
1042
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1043
+ if (pronghorn.methodsByName.createTrafficPolicyVersion.task) {
1044
+ try {
1045
+ a.createTrafficPolicyVersion(Id, CreateTrafficPolicyVersionBodyParam, (data, error) => {
1046
+ try {
1047
+ if (stub) {
1048
+ const displayE = 'Error 400 received on request';
1049
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
1050
+ } else {
1051
+ runCommonAsserts(data, error);
1052
+ }
1053
+ saveMockData('20130401', 'createTrafficPolicyVersion', 'default', data);
1054
+ done();
1055
+ } catch (err) {
1056
+ log.error(`Test Failure: ${err}`);
1057
+ done(err);
1058
+ }
1059
+ });
1060
+ } catch (error) {
1061
+ log.error(`Adapter Exception: ${error}`);
1062
+ done(error);
1063
+ }
1064
+ } else {
1065
+ log.error('createTrafficPolicyVersion task is false, skipping test');
1066
+ skipCount += 1;
1067
+ done();
1068
+ }// end if task
1069
+ }).timeout(attemptTimeout);
1070
+ });
1071
+
1072
+ const Version = 555;
1073
+ const UpdateTrafficPolicyCommentBodyParam = '<xml>fakedata</xml>';
1074
+ describe('#updateTrafficPolicyComment - errors', () => {
1075
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1076
+ if (pronghorn.methodsByName.updateTrafficPolicyComment.task) {
1077
+ try {
1078
+ a.updateTrafficPolicyComment(Id, Version, UpdateTrafficPolicyCommentBodyParam, (data, error) => {
1079
+ try {
1080
+ if (stub) {
1081
+ const displayE = 'Error 400 received on request';
1082
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
1083
+ } else {
1084
+ runCommonAsserts(data, error);
1085
+ }
1086
+ saveMockData('20130401', 'updateTrafficPolicyComment', 'default', data);
1087
+ done();
1088
+ } catch (err) {
1089
+ log.error(`Test Failure: ${err}`);
1090
+ done(err);
1091
+ }
1092
+ });
1093
+ } catch (error) {
1094
+ log.error(`Adapter Exception: ${error}`);
1095
+ done(error);
1096
+ }
1097
+ } else {
1098
+ log.error('updateTrafficPolicyComment task is false, skipping test');
1099
+ skipCount += 1;
1100
+ done();
1101
+ }// end if task
1102
+ }).timeout(attemptTimeout);
1103
+ });
1104
+
1105
+ const CreateTrafficPolicyInstanceBodyParam = '<xml>fakedata</xml>';
1106
+ describe('#createTrafficPolicyInstance - errors', () => {
1107
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1108
+ if (pronghorn.methodsByName.createTrafficPolicyInstance.task) {
1109
+ try {
1110
+ a.createTrafficPolicyInstance(CreateTrafficPolicyInstanceBodyParam, (data, error) => {
1111
+ try {
1112
+ if (stub) {
1113
+ const displayE = 'Error 400 received on request';
1114
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
1115
+ } else {
1116
+ runCommonAsserts(data, error);
1117
+ }
1118
+ saveMockData('20130401', 'createTrafficPolicyInstance', 'default', data);
1119
+ done();
1120
+ } catch (err) {
1121
+ log.error(`Test Failure: ${err}`);
1122
+ done(err);
1123
+ }
1124
+ });
1125
+ } catch (error) {
1126
+ log.error(`Adapter Exception: ${error}`);
1127
+ done(error);
1128
+ }
1129
+ } else {
1130
+ log.error('createTrafficPolicyInstance task is false, skipping test');
1131
+ skipCount += 1;
1132
+ done();
1133
+ }// end if task
1134
+ }).timeout(attemptTimeout);
1135
+ });
1136
+
1137
+ const UpdateTrafficPolicyInstanceBodyParam = '<xml>fakedata</xml>';
1138
+ describe('#updateTrafficPolicyInstance - errors', () => {
1139
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1140
+ if (pronghorn.methodsByName.updateTrafficPolicyInstance.task) {
1141
+ try {
1142
+ a.updateTrafficPolicyInstance(Id, UpdateTrafficPolicyInstanceBodyParam, (data, error) => {
1143
+ try {
1144
+ if (stub) {
1145
+ const displayE = 'Error 400 received on request';
1146
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
1147
+ } else {
1148
+ runCommonAsserts(data, error);
1149
+ }
1150
+ saveMockData('20130401', 'updateTrafficPolicyInstance', 'default', data);
1151
+ done();
1152
+ } catch (err) {
1153
+ log.error(`Test Failure: ${err}`);
1154
+ done(err);
1155
+ }
1156
+ });
1157
+ } catch (error) {
1158
+ log.error(`Adapter Exception: ${error}`);
1159
+ done(error);
1160
+ }
1161
+ } else {
1162
+ log.error('updateTrafficPolicyInstance task is false, skipping test');
1163
+ skipCount += 1;
1164
+ done();
1165
+ }// end if task
1166
+ }).timeout(attemptTimeout);
1167
+ });
1168
+
1169
+ const Type = 'fakedata';
1170
+ describe('#getAccountLimit - errors', () => {
1171
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1172
+ if (pronghorn.methodsByName.getAccountLimit.task) {
1173
+ try {
1174
+ a.getAccountLimit(Type, (data, error) => {
1175
+ try {
1176
+ if (stub) {
1177
+ const displayE = 'Error 400 received on request';
1178
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
1179
+ } else {
1180
+ runCommonAsserts(data, error);
1181
+ }
1182
+ saveMockData('20130401', 'getAccountLimit', 'default', data);
1183
+ done();
1184
+ } catch (err) {
1185
+ log.error(`Test Failure: ${err}`);
1186
+ done(err);
1187
+ }
1188
+ });
1189
+ } catch (error) {
1190
+ log.error(`Adapter Exception: ${error}`);
1191
+ done(error);
1192
+ }
1193
+ } else {
1194
+ log.error('getAccountLimit task is false, skipping test');
1195
+ skipCount += 1;
1196
+ done();
1197
+ }// end if task
1198
+ }).timeout(attemptTimeout);
1199
+ });
1200
+
1201
+ describe('#getChange - errors', () => {
1202
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1203
+ if (pronghorn.methodsByName.getChange.task) {
1204
+ try {
1205
+ a.getChange(Id, (data, error) => {
1206
+ try {
1207
+ if (stub) {
1208
+ const displayE = 'Error 400 received on request';
1209
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
1210
+ } else {
1211
+ runCommonAsserts(data, error);
1212
+ }
1213
+ saveMockData('20130401', 'getChange', 'default', data);
1214
+ done();
1215
+ } catch (err) {
1216
+ log.error(`Test Failure: ${err}`);
1217
+ done(err);
1218
+ }
1219
+ });
1220
+ } catch (error) {
1221
+ log.error(`Adapter Exception: ${error}`);
1222
+ done(error);
1223
+ }
1224
+ } else {
1225
+ log.error('getChange task is false, skipping test');
1226
+ skipCount += 1;
1227
+ done();
1228
+ }// end if task
1229
+ }).timeout(attemptTimeout);
1230
+ });
1231
+
1232
+ describe('#getCheckerIpRanges - errors', () => {
1233
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1234
+ if (pronghorn.methodsByName.getCheckerIpRanges.task) {
1235
+ try {
1236
+ a.getCheckerIpRanges((data, error) => {
1237
+ try {
1238
+ if (stub) {
1239
+ const displayE = 'Error 400 received on request';
1240
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
1241
+ } else {
1242
+ runCommonAsserts(data, error);
1243
+ }
1244
+ saveMockData('20130401', 'getCheckerIpRanges', 'default', data);
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
+ } else {
1256
+ log.error('getCheckerIpRanges task is false, skipping test');
1257
+ skipCount += 1;
1258
+ done();
1259
+ }// end if task
1260
+ }).timeout(attemptTimeout);
1261
+ });
1262
+
1263
+ describe('#listReusableDelegationSets - errors', () => {
1264
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1265
+ if (pronghorn.methodsByName.listReusableDelegationSets.task) {
1266
+ try {
1267
+ a.listReusableDelegationSets(null, null, (data, error) => {
1268
+ try {
1269
+ if (stub) {
1270
+ const displayE = 'Error 400 received on request';
1271
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
1272
+ } else {
1273
+ runCommonAsserts(data, error);
1274
+ }
1275
+ saveMockData('20130401', 'listReusableDelegationSets', 'default', data);
1276
+ done();
1277
+ } catch (err) {
1278
+ log.error(`Test Failure: ${err}`);
1279
+ done(err);
1280
+ }
1281
+ });
1282
+ } catch (error) {
1283
+ log.error(`Adapter Exception: ${error}`);
1284
+ done(error);
1285
+ }
1286
+ } else {
1287
+ log.error('listReusableDelegationSets task is false, skipping test');
1288
+ skipCount += 1;
1289
+ done();
1290
+ }// end if task
1291
+ }).timeout(attemptTimeout);
1292
+ });
1293
+
1294
+ describe('#getReusableDelegationSet - errors', () => {
1295
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1296
+ if (pronghorn.methodsByName.getReusableDelegationSet.task) {
1297
+ try {
1298
+ a.getReusableDelegationSet(Id, (data, error) => {
1299
+ try {
1300
+ if (stub) {
1301
+ const displayE = 'Error 400 received on request';
1302
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
1303
+ } else {
1304
+ runCommonAsserts(data, error);
1305
+ }
1306
+ saveMockData('20130401', 'getReusableDelegationSet', 'default', data);
1307
+ done();
1308
+ } catch (err) {
1309
+ log.error(`Test Failure: ${err}`);
1310
+ done(err);
1311
+ }
1312
+ });
1313
+ } catch (error) {
1314
+ log.error(`Adapter Exception: ${error}`);
1315
+ done(error);
1316
+ }
1317
+ } else {
1318
+ log.error('getReusableDelegationSet task is false, skipping test');
1319
+ skipCount += 1;
1320
+ done();
1321
+ }// end if task
1322
+ }).timeout(attemptTimeout);
1323
+ });
1324
+
1325
+ describe('#getGeoLocation - errors', () => {
1326
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1327
+ if (pronghorn.methodsByName.getGeoLocation.task) {
1328
+ try {
1329
+ a.getGeoLocation(null, null, null, (data, error) => {
1330
+ try {
1331
+ if (stub) {
1332
+ const displayE = 'Error 400 received on request';
1333
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
1334
+ } else {
1335
+ runCommonAsserts(data, error);
1336
+ }
1337
+ saveMockData('20130401', 'getGeoLocation', 'default', data);
1338
+ done();
1339
+ } catch (err) {
1340
+ log.error(`Test Failure: ${err}`);
1341
+ done(err);
1342
+ }
1343
+ });
1344
+ } catch (error) {
1345
+ log.error(`Adapter Exception: ${error}`);
1346
+ done(error);
1347
+ }
1348
+ } else {
1349
+ log.error('getGeoLocation task is false, skipping test');
1350
+ skipCount += 1;
1351
+ done();
1352
+ }// end if task
1353
+ }).timeout(attemptTimeout);
1354
+ });
1355
+
1356
+ describe('#listGeoLocations - errors', () => {
1357
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1358
+ if (pronghorn.methodsByName.listGeoLocations.task) {
1359
+ try {
1360
+ a.listGeoLocations(null, null, null, null, (data, error) => {
1361
+ try {
1362
+ if (stub) {
1363
+ const displayE = 'Error 400 received on request';
1364
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
1365
+ } else {
1366
+ runCommonAsserts(data, error);
1367
+ }
1368
+ saveMockData('20130401', 'listGeoLocations', 'default', data);
1369
+ done();
1370
+ } catch (err) {
1371
+ log.error(`Test Failure: ${err}`);
1372
+ done(err);
1373
+ }
1374
+ });
1375
+ } catch (error) {
1376
+ log.error(`Adapter Exception: ${error}`);
1377
+ done(error);
1378
+ }
1379
+ } else {
1380
+ log.error('listGeoLocations task is false, skipping test');
1381
+ skipCount += 1;
1382
+ done();
1383
+ }// end if task
1384
+ }).timeout(attemptTimeout);
1385
+ });
1386
+
1387
+ describe('#listHealthChecks - errors', () => {
1388
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1389
+ if (pronghorn.methodsByName.listHealthChecks.task) {
1390
+ try {
1391
+ a.listHealthChecks(null, null, null, null, (data, error) => {
1392
+ try {
1393
+ if (stub) {
1394
+ const displayE = 'Error 400 received on request';
1395
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
1396
+ } else {
1397
+ runCommonAsserts(data, error);
1398
+ }
1399
+ saveMockData('20130401', 'listHealthChecks', 'default', data);
1400
+ done();
1401
+ } catch (err) {
1402
+ log.error(`Test Failure: ${err}`);
1403
+ done(err);
1404
+ }
1405
+ });
1406
+ } catch (error) {
1407
+ log.error(`Adapter Exception: ${error}`);
1408
+ done(error);
1409
+ }
1410
+ } else {
1411
+ log.error('listHealthChecks task is false, skipping test');
1412
+ skipCount += 1;
1413
+ done();
1414
+ }// end if task
1415
+ }).timeout(attemptTimeout);
1416
+ });
1417
+
1418
+ describe('#getHealthCheck - errors', () => {
1419
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1420
+ if (pronghorn.methodsByName.getHealthCheck.task) {
1421
+ try {
1422
+ a.getHealthCheck(HealthCheckId, (data, error) => {
1423
+ try {
1424
+ if (stub) {
1425
+ const displayE = 'Error 400 received on request';
1426
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
1427
+ } else {
1428
+ runCommonAsserts(data, error);
1429
+ }
1430
+ saveMockData('20130401', 'getHealthCheck', 'default', data);
1431
+ done();
1432
+ } catch (err) {
1433
+ log.error(`Test Failure: ${err}`);
1434
+ done(err);
1435
+ }
1436
+ });
1437
+ } catch (error) {
1438
+ log.error(`Adapter Exception: ${error}`);
1439
+ done(error);
1440
+ }
1441
+ } else {
1442
+ log.error('getHealthCheck task is false, skipping test');
1443
+ skipCount += 1;
1444
+ done();
1445
+ }// end if task
1446
+ }).timeout(attemptTimeout);
1447
+ });
1448
+
1449
+ describe('#getHealthCheckLastFailureReason - errors', () => {
1450
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1451
+ if (pronghorn.methodsByName.getHealthCheckLastFailureReason.task) {
1452
+ try {
1453
+ a.getHealthCheckLastFailureReason(HealthCheckId, (data, error) => {
1454
+ try {
1455
+ if (stub) {
1456
+ const displayE = 'Error 400 received on request';
1457
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
1458
+ } else {
1459
+ runCommonAsserts(data, error);
1460
+ }
1461
+ saveMockData('20130401', 'getHealthCheckLastFailureReason', 'default', data);
1462
+ done();
1463
+ } catch (err) {
1464
+ log.error(`Test Failure: ${err}`);
1465
+ done(err);
1466
+ }
1467
+ });
1468
+ } catch (error) {
1469
+ log.error(`Adapter Exception: ${error}`);
1470
+ done(error);
1471
+ }
1472
+ } else {
1473
+ log.error('getHealthCheckLastFailureReason task is false, skipping test');
1474
+ skipCount += 1;
1475
+ done();
1476
+ }// end if task
1477
+ }).timeout(attemptTimeout);
1478
+ });
1479
+
1480
+ describe('#getHealthCheckStatus - errors', () => {
1481
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1482
+ if (pronghorn.methodsByName.getHealthCheckStatus.task) {
1483
+ try {
1484
+ a.getHealthCheckStatus(HealthCheckId, (data, error) => {
1485
+ try {
1486
+ if (stub) {
1487
+ const displayE = 'Error 400 received on request';
1488
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
1489
+ } else {
1490
+ runCommonAsserts(data, error);
1491
+ }
1492
+ saveMockData('20130401', 'getHealthCheckStatus', 'default', data);
1493
+ done();
1494
+ } catch (err) {
1495
+ log.error(`Test Failure: ${err}`);
1496
+ done(err);
1497
+ }
1498
+ });
1499
+ } catch (error) {
1500
+ log.error(`Adapter Exception: ${error}`);
1501
+ done(error);
1502
+ }
1503
+ } else {
1504
+ log.error('getHealthCheckStatus task is false, skipping test');
1505
+ skipCount += 1;
1506
+ done();
1507
+ }// end if task
1508
+ }).timeout(attemptTimeout);
1509
+ });
1510
+
1511
+ describe('#getHealthCheckCount - errors', () => {
1512
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1513
+ if (pronghorn.methodsByName.getHealthCheckCount.task) {
1514
+ try {
1515
+ a.getHealthCheckCount((data, error) => {
1516
+ try {
1517
+ if (stub) {
1518
+ const displayE = 'Error 400 received on request';
1519
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
1520
+ } else {
1521
+ runCommonAsserts(data, error);
1522
+ }
1523
+ saveMockData('20130401', 'getHealthCheckCount', 'default', data);
1524
+ done();
1525
+ } catch (err) {
1526
+ log.error(`Test Failure: ${err}`);
1527
+ done(err);
1528
+ }
1529
+ });
1530
+ } catch (error) {
1531
+ log.error(`Adapter Exception: ${error}`);
1532
+ done(error);
1533
+ }
1534
+ } else {
1535
+ log.error('getHealthCheckCount task is false, skipping test');
1536
+ skipCount += 1;
1537
+ done();
1538
+ }// end if task
1539
+ }).timeout(attemptTimeout);
1540
+ });
1541
+
1542
+ describe('#listHostedZones - errors', () => {
1543
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1544
+ if (pronghorn.methodsByName.listHostedZones.task) {
1545
+ try {
1546
+ a.listHostedZones(null, null, null, null, null, (data, error) => {
1547
+ try {
1548
+ if (stub) {
1549
+ const displayE = 'Error 400 received on request';
1550
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
1551
+ } else {
1552
+ runCommonAsserts(data, error);
1553
+ }
1554
+ saveMockData('20130401', 'listHostedZones', 'default', data);
1555
+ done();
1556
+ } catch (err) {
1557
+ log.error(`Test Failure: ${err}`);
1558
+ done(err);
1559
+ }
1560
+ });
1561
+ } catch (error) {
1562
+ log.error(`Adapter Exception: ${error}`);
1563
+ done(error);
1564
+ }
1565
+ } else {
1566
+ log.error('listHostedZones task is false, skipping test');
1567
+ skipCount += 1;
1568
+ done();
1569
+ }// end if task
1570
+ }).timeout(attemptTimeout);
1571
+ });
1572
+
1573
+ describe('#getHostedZone - errors', () => {
1574
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1575
+ if (pronghorn.methodsByName.getHostedZone.task) {
1576
+ try {
1577
+ a.getHostedZone(Id, (data, error) => {
1578
+ try {
1579
+ if (stub) {
1580
+ const displayE = 'Error 400 received on request';
1581
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
1582
+ } else {
1583
+ runCommonAsserts(data, error);
1584
+ }
1585
+ saveMockData('20130401', 'getHostedZone', 'default', data);
1586
+ done();
1587
+ } catch (err) {
1588
+ log.error(`Test Failure: ${err}`);
1589
+ done(err);
1590
+ }
1591
+ });
1592
+ } catch (error) {
1593
+ log.error(`Adapter Exception: ${error}`);
1594
+ done(error);
1595
+ }
1596
+ } else {
1597
+ log.error('getHostedZone task is false, skipping test');
1598
+ skipCount += 1;
1599
+ done();
1600
+ }// end if task
1601
+ }).timeout(attemptTimeout);
1602
+ });
1603
+
1604
+ describe('#listVPCAssociationAuthorizations - errors', () => {
1605
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1606
+ if (pronghorn.methodsByName.listVPCAssociationAuthorizations.task) {
1607
+ try {
1608
+ a.listVPCAssociationAuthorizations(Id, null, null, (data, error) => {
1609
+ try {
1610
+ if (stub) {
1611
+ const displayE = 'Error 400 received on request';
1612
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
1613
+ } else {
1614
+ runCommonAsserts(data, error);
1615
+ }
1616
+ saveMockData('20130401', 'listVPCAssociationAuthorizations', 'default', data);
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
+ } else {
1628
+ log.error('listVPCAssociationAuthorizations task is false, skipping test');
1629
+ skipCount += 1;
1630
+ done();
1631
+ }// end if task
1632
+ }).timeout(attemptTimeout);
1633
+ });
1634
+
1635
+ describe('#getDNSSEC - errors', () => {
1636
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1637
+ if (pronghorn.methodsByName.getDNSSEC.task) {
1638
+ try {
1639
+ a.getDNSSEC(Id, (data, error) => {
1640
+ try {
1641
+ if (stub) {
1642
+ const displayE = 'Error 400 received on request';
1643
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
1644
+ } else {
1645
+ runCommonAsserts(data, error);
1646
+ }
1647
+ saveMockData('20130401', 'getDNSSEC', 'default', data);
1648
+ done();
1649
+ } catch (err) {
1650
+ log.error(`Test Failure: ${err}`);
1651
+ done(err);
1652
+ }
1653
+ });
1654
+ } catch (error) {
1655
+ log.error(`Adapter Exception: ${error}`);
1656
+ done(error);
1657
+ }
1658
+ } else {
1659
+ log.error('getDNSSEC task is false, skipping test');
1660
+ skipCount += 1;
1661
+ done();
1662
+ }// end if task
1663
+ }).timeout(attemptTimeout);
1664
+ });
1665
+
1666
+ describe('#listResourceRecordSets - errors', () => {
1667
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1668
+ if (pronghorn.methodsByName.listResourceRecordSets.task) {
1669
+ try {
1670
+ a.listResourceRecordSets(Id, Name, Type, null, null, null, null, null, null, (data, error) => {
1671
+ try {
1672
+ if (stub) {
1673
+ const displayE = 'Error 400 received on request';
1674
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
1675
+ } else {
1676
+ runCommonAsserts(data, error);
1677
+ }
1678
+ saveMockData('20130401', 'listResourceRecordSets', 'default', data);
1679
+ done();
1680
+ } catch (err) {
1681
+ log.error(`Test Failure: ${err}`);
1682
+ done(err);
1683
+ }
1684
+ });
1685
+ } catch (error) {
1686
+ log.error(`Adapter Exception: ${error}`);
1687
+ done(error);
1688
+ }
1689
+ } else {
1690
+ log.error('listResourceRecordSets task is false, skipping test');
1691
+ skipCount += 1;
1692
+ done();
1693
+ }// end if task
1694
+ }).timeout(attemptTimeout);
1695
+ });
1696
+
1697
+ describe('#getHostedZoneCount - errors', () => {
1698
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1699
+ if (pronghorn.methodsByName.getHostedZoneCount.task) {
1700
+ try {
1701
+ a.getHostedZoneCount((data, error) => {
1702
+ try {
1703
+ if (stub) {
1704
+ const displayE = 'Error 400 received on request';
1705
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
1706
+ } else {
1707
+ runCommonAsserts(data, error);
1708
+ }
1709
+ saveMockData('20130401', 'getHostedZoneCount', 'default', data);
1710
+ done();
1711
+ } catch (err) {
1712
+ log.error(`Test Failure: ${err}`);
1713
+ done(err);
1714
+ }
1715
+ });
1716
+ } catch (error) {
1717
+ log.error(`Adapter Exception: ${error}`);
1718
+ done(error);
1719
+ }
1720
+ } else {
1721
+ log.error('getHostedZoneCount task is false, skipping test');
1722
+ skipCount += 1;
1723
+ done();
1724
+ }// end if task
1725
+ }).timeout(attemptTimeout);
1726
+ });
1727
+
1728
+ describe('#getHostedZoneLimit - errors', () => {
1729
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1730
+ if (pronghorn.methodsByName.getHostedZoneLimit.task) {
1731
+ try {
1732
+ a.getHostedZoneLimit(Type, Id, (data, error) => {
1733
+ try {
1734
+ if (stub) {
1735
+ const displayE = 'Error 400 received on request';
1736
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
1737
+ } else {
1738
+ runCommonAsserts(data, error);
1739
+ }
1740
+ saveMockData('20130401', 'getHostedZoneLimit', 'default', data);
1741
+ done();
1742
+ } catch (err) {
1743
+ log.error(`Test Failure: ${err}`);
1744
+ done(err);
1745
+ }
1746
+ });
1747
+ } catch (error) {
1748
+ log.error(`Adapter Exception: ${error}`);
1749
+ done(error);
1750
+ }
1751
+ } else {
1752
+ log.error('getHostedZoneLimit task is false, skipping test');
1753
+ skipCount += 1;
1754
+ done();
1755
+ }// end if task
1756
+ }).timeout(attemptTimeout);
1757
+ });
1758
+
1759
+ const Hostedzoneid = 'fakedata';
1760
+ describe('#listHostedZonesByName - errors', () => {
1761
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1762
+ if (pronghorn.methodsByName.listHostedZonesByName.task) {
1763
+ try {
1764
+ a.listHostedZonesByName(null, Hostedzoneid, null, (data, error) => {
1765
+ try {
1766
+ if (stub) {
1767
+ const displayE = 'Error 400 received on request';
1768
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
1769
+ } else {
1770
+ runCommonAsserts(data, error);
1771
+ }
1772
+ saveMockData('20130401', 'listHostedZonesByName', 'default', data);
1773
+ done();
1774
+ } catch (err) {
1775
+ log.error(`Test Failure: ${err}`);
1776
+ done(err);
1777
+ }
1778
+ });
1779
+ } catch (error) {
1780
+ log.error(`Adapter Exception: ${error}`);
1781
+ done(error);
1782
+ }
1783
+ } else {
1784
+ log.error('listHostedZonesByName task is false, skipping test');
1785
+ skipCount += 1;
1786
+ done();
1787
+ }// end if task
1788
+ }).timeout(attemptTimeout);
1789
+ });
1790
+
1791
+ const Vpcid = 'fakedata';
1792
+ const Vpcregion = 'fakedata';
1793
+ describe('#listHostedZonesByVPC - errors', () => {
1794
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1795
+ if (pronghorn.methodsByName.listHostedZonesByVPC.task) {
1796
+ try {
1797
+ a.listHostedZonesByVPC(Vpcid, Vpcregion, null, null, (data, error) => {
1798
+ try {
1799
+ if (stub) {
1800
+ const displayE = 'Error 400 received on request';
1801
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
1802
+ } else {
1803
+ runCommonAsserts(data, error);
1804
+ }
1805
+ saveMockData('20130401', 'listHostedZonesByVPC', 'default', data);
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
+ } else {
1817
+ log.error('listHostedZonesByVPC task is false, skipping test');
1818
+ skipCount += 1;
1819
+ done();
1820
+ }// end if task
1821
+ }).timeout(attemptTimeout);
1822
+ });
1823
+
1824
+ describe('#listQueryLoggingConfigs - errors', () => {
1825
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1826
+ if (pronghorn.methodsByName.listQueryLoggingConfigs.task) {
1827
+ try {
1828
+ a.listQueryLoggingConfigs(Hostedzoneid, null, null, null, null, (data, error) => {
1829
+ try {
1830
+ if (stub) {
1831
+ const displayE = 'Error 400 received on request';
1832
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
1833
+ } else {
1834
+ runCommonAsserts(data, error);
1835
+ }
1836
+ saveMockData('20130401', 'listQueryLoggingConfigs', 'default', data);
1837
+ done();
1838
+ } catch (err) {
1839
+ log.error(`Test Failure: ${err}`);
1840
+ done(err);
1841
+ }
1842
+ });
1843
+ } catch (error) {
1844
+ log.error(`Adapter Exception: ${error}`);
1845
+ done(error);
1846
+ }
1847
+ } else {
1848
+ log.error('listQueryLoggingConfigs task is false, skipping test');
1849
+ skipCount += 1;
1850
+ done();
1851
+ }// end if task
1852
+ }).timeout(attemptTimeout);
1853
+ });
1854
+
1855
+ describe('#getQueryLoggingConfig - errors', () => {
1856
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1857
+ if (pronghorn.methodsByName.getQueryLoggingConfig.task) {
1858
+ try {
1859
+ a.getQueryLoggingConfig(Id, (data, error) => {
1860
+ try {
1861
+ if (stub) {
1862
+ const displayE = 'Error 400 received on request';
1863
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
1864
+ } else {
1865
+ runCommonAsserts(data, error);
1866
+ }
1867
+ saveMockData('20130401', 'getQueryLoggingConfig', 'default', data);
1868
+ done();
1869
+ } catch (err) {
1870
+ log.error(`Test Failure: ${err}`);
1871
+ done(err);
1872
+ }
1873
+ });
1874
+ } catch (error) {
1875
+ log.error(`Adapter Exception: ${error}`);
1876
+ done(error);
1877
+ }
1878
+ } else {
1879
+ log.error('getQueryLoggingConfig task is false, skipping test');
1880
+ skipCount += 1;
1881
+ done();
1882
+ }// end if task
1883
+ }).timeout(attemptTimeout);
1884
+ });
1885
+
1886
+ describe('#getReusableDelegationSetLimit - errors', () => {
1887
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1888
+ if (pronghorn.methodsByName.getReusableDelegationSetLimit.task) {
1889
+ try {
1890
+ a.getReusableDelegationSetLimit(Type, Id, (data, error) => {
1891
+ try {
1892
+ if (stub) {
1893
+ const displayE = 'Error 400 received on request';
1894
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
1895
+ } else {
1896
+ runCommonAsserts(data, error);
1897
+ }
1898
+ saveMockData('20130401', 'getReusableDelegationSetLimit', 'default', data);
1899
+ done();
1900
+ } catch (err) {
1901
+ log.error(`Test Failure: ${err}`);
1902
+ done(err);
1903
+ }
1904
+ });
1905
+ } catch (error) {
1906
+ log.error(`Adapter Exception: ${error}`);
1907
+ done(error);
1908
+ }
1909
+ } else {
1910
+ log.error('getReusableDelegationSetLimit task is false, skipping test');
1911
+ skipCount += 1;
1912
+ done();
1913
+ }// end if task
1914
+ }).timeout(attemptTimeout);
1915
+ });
1916
+
1917
+ describe('#listTagsForResource - errors', () => {
1918
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1919
+ if (pronghorn.methodsByName.listTagsForResource.task) {
1920
+ try {
1921
+ a.listTagsForResource(ResourceType, ResourceId, (data, error) => {
1922
+ try {
1923
+ if (stub) {
1924
+ const displayE = 'Error 400 received on request';
1925
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
1926
+ } else {
1927
+ runCommonAsserts(data, error);
1928
+ }
1929
+ saveMockData('20130401', 'listTagsForResource', 'default', data);
1930
+ done();
1931
+ } catch (err) {
1932
+ log.error(`Test Failure: ${err}`);
1933
+ done(err);
1934
+ }
1935
+ });
1936
+ } catch (error) {
1937
+ log.error(`Adapter Exception: ${error}`);
1938
+ done(error);
1939
+ }
1940
+ } else {
1941
+ log.error('listTagsForResource task is false, skipping test');
1942
+ skipCount += 1;
1943
+ done();
1944
+ }// end if task
1945
+ }).timeout(attemptTimeout);
1946
+ });
1947
+
1948
+ const Recordname = 'fakedata';
1949
+ const Recordtype = 'fakedata';
1950
+ describe('#testDNSAnswer - errors', () => {
1951
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1952
+ if (pronghorn.methodsByName.testDNSAnswer.task) {
1953
+ try {
1954
+ a.testDNSAnswer(Hostedzoneid, Recordname, Recordtype, null, null, null, (data, error) => {
1955
+ try {
1956
+ if (stub) {
1957
+ const displayE = 'Error 400 received on request';
1958
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
1959
+ } else {
1960
+ runCommonAsserts(data, error);
1961
+ }
1962
+ saveMockData('20130401', 'testDNSAnswer', 'default', data);
1963
+ done();
1964
+ } catch (err) {
1965
+ log.error(`Test Failure: ${err}`);
1966
+ done(err);
1967
+ }
1968
+ });
1969
+ } catch (error) {
1970
+ log.error(`Adapter Exception: ${error}`);
1971
+ done(error);
1972
+ }
1973
+ } else {
1974
+ log.error('testDNSAnswer task is false, skipping test');
1975
+ skipCount += 1;
1976
+ done();
1977
+ }// end if task
1978
+ }).timeout(attemptTimeout);
1979
+ });
1980
+
1981
+ describe('#listTrafficPolicies - errors', () => {
1982
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1983
+ if (pronghorn.methodsByName.listTrafficPolicies.task) {
1984
+ try {
1985
+ a.listTrafficPolicies(null, null, (data, error) => {
1986
+ try {
1987
+ if (stub) {
1988
+ const displayE = 'Error 400 received on request';
1989
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
1990
+ } else {
1991
+ runCommonAsserts(data, error);
1992
+ }
1993
+ saveMockData('20130401', 'listTrafficPolicies', 'default', data);
1994
+ done();
1995
+ } catch (err) {
1996
+ log.error(`Test Failure: ${err}`);
1997
+ done(err);
1998
+ }
1999
+ });
2000
+ } catch (error) {
2001
+ log.error(`Adapter Exception: ${error}`);
2002
+ done(error);
2003
+ }
2004
+ } else {
2005
+ log.error('listTrafficPolicies task is false, skipping test');
2006
+ skipCount += 1;
2007
+ done();
2008
+ }// end if task
2009
+ }).timeout(attemptTimeout);
2010
+ });
2011
+
2012
+ describe('#listTrafficPolicyVersions - errors', () => {
2013
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2014
+ if (pronghorn.methodsByName.listTrafficPolicyVersions.task) {
2015
+ try {
2016
+ a.listTrafficPolicyVersions(Id, null, null, (data, error) => {
2017
+ try {
2018
+ if (stub) {
2019
+ const displayE = 'Error 400 received on request';
2020
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
2021
+ } else {
2022
+ runCommonAsserts(data, error);
2023
+ }
2024
+ saveMockData('20130401', 'listTrafficPolicyVersions', 'default', data);
2025
+ done();
2026
+ } catch (err) {
2027
+ log.error(`Test Failure: ${err}`);
2028
+ done(err);
2029
+ }
2030
+ });
2031
+ } catch (error) {
2032
+ log.error(`Adapter Exception: ${error}`);
2033
+ done(error);
2034
+ }
2035
+ } else {
2036
+ log.error('listTrafficPolicyVersions task is false, skipping test');
2037
+ skipCount += 1;
2038
+ done();
2039
+ }// end if task
2040
+ }).timeout(attemptTimeout);
2041
+ });
2042
+
2043
+ describe('#getTrafficPolicy - errors', () => {
2044
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2045
+ if (pronghorn.methodsByName.getTrafficPolicy.task) {
2046
+ try {
2047
+ a.getTrafficPolicy(Id, Version, (data, error) => {
2048
+ try {
2049
+ if (stub) {
2050
+ const displayE = 'Error 400 received on request';
2051
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
2052
+ } else {
2053
+ runCommonAsserts(data, error);
2054
+ }
2055
+ saveMockData('20130401', 'getTrafficPolicy', 'default', data);
2056
+ done();
2057
+ } catch (err) {
2058
+ log.error(`Test Failure: ${err}`);
2059
+ done(err);
2060
+ }
2061
+ });
2062
+ } catch (error) {
2063
+ log.error(`Adapter Exception: ${error}`);
2064
+ done(error);
2065
+ }
2066
+ } else {
2067
+ log.error('getTrafficPolicy task is false, skipping test');
2068
+ skipCount += 1;
2069
+ done();
2070
+ }// end if task
2071
+ }).timeout(attemptTimeout);
2072
+ });
2073
+
2074
+ describe('#getTrafficPolicyInstance - errors', () => {
2075
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2076
+ if (pronghorn.methodsByName.getTrafficPolicyInstance.task) {
2077
+ try {
2078
+ a.getTrafficPolicyInstance(Id, (data, error) => {
2079
+ try {
2080
+ if (stub) {
2081
+ const displayE = 'Error 400 received on request';
2082
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
2083
+ } else {
2084
+ runCommonAsserts(data, error);
2085
+ }
2086
+ saveMockData('20130401', 'getTrafficPolicyInstance', 'default', data);
2087
+ done();
2088
+ } catch (err) {
2089
+ log.error(`Test Failure: ${err}`);
2090
+ done(err);
2091
+ }
2092
+ });
2093
+ } catch (error) {
2094
+ log.error(`Adapter Exception: ${error}`);
2095
+ done(error);
2096
+ }
2097
+ } else {
2098
+ log.error('getTrafficPolicyInstance task is false, skipping test');
2099
+ skipCount += 1;
2100
+ done();
2101
+ }// end if task
2102
+ }).timeout(attemptTimeout);
2103
+ });
2104
+
2105
+ describe('#getTrafficPolicyInstanceCount - errors', () => {
2106
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2107
+ if (pronghorn.methodsByName.getTrafficPolicyInstanceCount.task) {
2108
+ try {
2109
+ a.getTrafficPolicyInstanceCount((data, error) => {
2110
+ try {
2111
+ if (stub) {
2112
+ const displayE = 'Error 400 received on request';
2113
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
2114
+ } else {
2115
+ runCommonAsserts(data, error);
2116
+ }
2117
+ saveMockData('20130401', 'getTrafficPolicyInstanceCount', 'default', data);
2118
+ done();
2119
+ } catch (err) {
2120
+ log.error(`Test Failure: ${err}`);
2121
+ done(err);
2122
+ }
2123
+ });
2124
+ } catch (error) {
2125
+ log.error(`Adapter Exception: ${error}`);
2126
+ done(error);
2127
+ }
2128
+ } else {
2129
+ log.error('getTrafficPolicyInstanceCount task is false, skipping test');
2130
+ skipCount += 1;
2131
+ done();
2132
+ }// end if task
2133
+ }).timeout(attemptTimeout);
2134
+ });
2135
+
2136
+ describe('#listTrafficPolicyInstances - errors', () => {
2137
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2138
+ if (pronghorn.methodsByName.listTrafficPolicyInstances.task) {
2139
+ try {
2140
+ a.listTrafficPolicyInstances(Hostedzoneid, null, null, null, (data, error) => {
2141
+ try {
2142
+ if (stub) {
2143
+ const displayE = 'Error 400 received on request';
2144
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
2145
+ } else {
2146
+ runCommonAsserts(data, error);
2147
+ }
2148
+ saveMockData('20130401', 'listTrafficPolicyInstances', 'default', data);
2149
+ done();
2150
+ } catch (err) {
2151
+ log.error(`Test Failure: ${err}`);
2152
+ done(err);
2153
+ }
2154
+ });
2155
+ } catch (error) {
2156
+ log.error(`Adapter Exception: ${error}`);
2157
+ done(error);
2158
+ }
2159
+ } else {
2160
+ log.error('listTrafficPolicyInstances task is false, skipping test');
2161
+ skipCount += 1;
2162
+ done();
2163
+ }// end if task
2164
+ }).timeout(attemptTimeout);
2165
+ });
2166
+
2167
+ describe('#listTrafficPolicyInstancesByHostedZone - errors', () => {
2168
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2169
+ if (pronghorn.methodsByName.listTrafficPolicyInstancesByHostedZone.task) {
2170
+ try {
2171
+ a.listTrafficPolicyInstancesByHostedZone(Id, null, null, null, (data, error) => {
2172
+ try {
2173
+ if (stub) {
2174
+ const displayE = 'Error 400 received on request';
2175
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
2176
+ } else {
2177
+ runCommonAsserts(data, error);
2178
+ }
2179
+ saveMockData('20130401', 'listTrafficPolicyInstancesByHostedZone', 'default', data);
2180
+ done();
2181
+ } catch (err) {
2182
+ log.error(`Test Failure: ${err}`);
2183
+ done(err);
2184
+ }
2185
+ });
2186
+ } catch (error) {
2187
+ log.error(`Adapter Exception: ${error}`);
2188
+ done(error);
2189
+ }
2190
+ } else {
2191
+ log.error('listTrafficPolicyInstancesByHostedZone task is false, skipping test');
2192
+ skipCount += 1;
2193
+ done();
2194
+ }// end if task
2195
+ }).timeout(attemptTimeout);
2196
+ });
2197
+
2198
+ describe('#listTrafficPolicyInstancesByPolicy - errors', () => {
2199
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2200
+ if (pronghorn.methodsByName.listTrafficPolicyInstancesByPolicy.task) {
2201
+ try {
2202
+ a.listTrafficPolicyInstancesByPolicy(Id, Version, Hostedzoneid, null, null, null, (data, error) => {
2203
+ try {
2204
+ if (stub) {
2205
+ const displayE = 'Error 400 received on request';
2206
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
2207
+ } else {
2208
+ runCommonAsserts(data, error);
2209
+ }
2210
+ saveMockData('20130401', 'listTrafficPolicyInstancesByPolicy', 'default', data);
2211
+ done();
2212
+ } catch (err) {
2213
+ log.error(`Test Failure: ${err}`);
2214
+ done(err);
2215
+ }
2216
+ });
2217
+ } catch (error) {
2218
+ log.error(`Adapter Exception: ${error}`);
2219
+ done(error);
2220
+ }
2221
+ } else {
2222
+ log.error('listTrafficPolicyInstancesByPolicy task is false, skipping test');
2223
+ skipCount += 1;
2224
+ done();
2225
+ }// end if task
2226
+ }).timeout(attemptTimeout);
2227
+ });
2228
+
2229
+ describe('#deleteReusableDelegationSet - errors', () => {
2230
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2231
+ if (pronghorn.methodsByName.deleteReusableDelegationSet.task) {
2232
+ try {
2233
+ a.deleteReusableDelegationSet(Id, (data, error) => {
2234
+ try {
2235
+ if (stub) {
2236
+ const displayE = 'Error 400 received on request';
2237
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
2238
+ } else {
2239
+ runCommonAsserts(data, error);
2240
+ }
2241
+ saveMockData('20130401', 'deleteReusableDelegationSet', 'default', data);
2242
+ done();
2243
+ } catch (err) {
2244
+ log.error(`Test Failure: ${err}`);
2245
+ done(err);
2246
+ }
2247
+ });
2248
+ } catch (error) {
2249
+ log.error(`Adapter Exception: ${error}`);
2250
+ done(error);
2251
+ }
2252
+ } else {
2253
+ log.error('deleteReusableDelegationSet task is false, skipping test');
2254
+ skipCount += 1;
2255
+ done();
2256
+ }// end if task
2257
+ }).timeout(attemptTimeout);
2258
+ });
2259
+
2260
+ describe('#deleteHealthCheck - errors', () => {
2261
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2262
+ if (pronghorn.methodsByName.deleteHealthCheck.task) {
2263
+ try {
2264
+ a.deleteHealthCheck(HealthCheckId, (data, error) => {
2265
+ try {
2266
+ if (stub) {
2267
+ const displayE = 'Error 400 received on request';
2268
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
2269
+ } else {
2270
+ runCommonAsserts(data, error);
2271
+ }
2272
+ saveMockData('20130401', 'deleteHealthCheck', 'default', data);
2273
+ done();
2274
+ } catch (err) {
2275
+ log.error(`Test Failure: ${err}`);
2276
+ done(err);
2277
+ }
2278
+ });
2279
+ } catch (error) {
2280
+ log.error(`Adapter Exception: ${error}`);
2281
+ done(error);
2282
+ }
2283
+ } else {
2284
+ log.error('deleteHealthCheck task is false, skipping test');
2285
+ skipCount += 1;
2286
+ done();
2287
+ }// end if task
2288
+ }).timeout(attemptTimeout);
2289
+ });
2290
+
2291
+ describe('#deleteHostedZone - errors', () => {
2292
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2293
+ if (pronghorn.methodsByName.deleteHostedZone.task) {
2294
+ try {
2295
+ a.deleteHostedZone(Id, (data, error) => {
2296
+ try {
2297
+ if (stub) {
2298
+ const displayE = 'Error 400 received on request';
2299
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
2300
+ } else {
2301
+ runCommonAsserts(data, error);
2302
+ }
2303
+ saveMockData('20130401', 'deleteHostedZone', 'default', data);
2304
+ done();
2305
+ } catch (err) {
2306
+ log.error(`Test Failure: ${err}`);
2307
+ done(err);
2308
+ }
2309
+ });
2310
+ } catch (error) {
2311
+ log.error(`Adapter Exception: ${error}`);
2312
+ done(error);
2313
+ }
2314
+ } else {
2315
+ log.error('deleteHostedZone task is false, skipping test');
2316
+ skipCount += 1;
2317
+ done();
2318
+ }// end if task
2319
+ }).timeout(attemptTimeout);
2320
+ });
2321
+
2322
+ describe('#deleteKeySigningKey - errors', () => {
2323
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2324
+ if (pronghorn.methodsByName.deleteKeySigningKey.task) {
2325
+ try {
2326
+ a.deleteKeySigningKey(HostedZoneId, Name, (data, error) => {
2327
+ try {
2328
+ if (stub) {
2329
+ const displayE = 'Error 400 received on request';
2330
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
2331
+ } else {
2332
+ runCommonAsserts(data, error);
2333
+ }
2334
+ saveMockData('20130401', 'deleteKeySigningKey', 'default', data);
2335
+ done();
2336
+ } catch (err) {
2337
+ log.error(`Test Failure: ${err}`);
2338
+ done(err);
2339
+ }
2340
+ });
2341
+ } catch (error) {
2342
+ log.error(`Adapter Exception: ${error}`);
2343
+ done(error);
2344
+ }
2345
+ } else {
2346
+ log.error('deleteKeySigningKey task is false, skipping test');
2347
+ skipCount += 1;
2348
+ done();
2349
+ }// end if task
2350
+ }).timeout(attemptTimeout);
2351
+ });
2352
+
2353
+ describe('#deleteQueryLoggingConfig - errors', () => {
2354
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2355
+ if (pronghorn.methodsByName.deleteQueryLoggingConfig.task) {
2356
+ try {
2357
+ a.deleteQueryLoggingConfig(Id, (data, error) => {
2358
+ try {
2359
+ if (stub) {
2360
+ const displayE = 'Error 400 received on request';
2361
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
2362
+ } else {
2363
+ runCommonAsserts(data, error);
2364
+ }
2365
+ saveMockData('20130401', 'deleteQueryLoggingConfig', 'default', data);
2366
+ done();
2367
+ } catch (err) {
2368
+ log.error(`Test Failure: ${err}`);
2369
+ done(err);
2370
+ }
2371
+ });
2372
+ } catch (error) {
2373
+ log.error(`Adapter Exception: ${error}`);
2374
+ done(error);
2375
+ }
2376
+ } else {
2377
+ log.error('deleteQueryLoggingConfig task is false, skipping test');
2378
+ skipCount += 1;
2379
+ done();
2380
+ }// end if task
2381
+ }).timeout(attemptTimeout);
2382
+ });
2383
+
2384
+ describe('#deleteTrafficPolicy - errors', () => {
2385
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2386
+ if (pronghorn.methodsByName.deleteTrafficPolicy.task) {
2387
+ try {
2388
+ a.deleteTrafficPolicy(Id, Version, (data, error) => {
2389
+ try {
2390
+ if (stub) {
2391
+ const displayE = 'Error 400 received on request';
2392
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
2393
+ } else {
2394
+ runCommonAsserts(data, error);
2395
+ }
2396
+ saveMockData('20130401', 'deleteTrafficPolicy', 'default', data);
2397
+ done();
2398
+ } catch (err) {
2399
+ log.error(`Test Failure: ${err}`);
2400
+ done(err);
2401
+ }
2402
+ });
2403
+ } catch (error) {
2404
+ log.error(`Adapter Exception: ${error}`);
2405
+ done(error);
2406
+ }
2407
+ } else {
2408
+ log.error('deleteTrafficPolicy task is false, skipping test');
2409
+ skipCount += 1;
2410
+ done();
2411
+ }// end if task
2412
+ }).timeout(attemptTimeout);
2413
+ });
2414
+
2415
+ describe('#deleteTrafficPolicyInstance - errors', () => {
2416
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2417
+ if (pronghorn.methodsByName.deleteTrafficPolicyInstance.task) {
2418
+ try {
2419
+ a.deleteTrafficPolicyInstance(Id, (data, error) => {
2420
+ try {
2421
+ if (stub) {
2422
+ const displayE = 'Error 400 received on request';
2423
+ runErrorAsserts(data, error, 'AD.500', 'Test-amazon_route53-connectorRest-handleEndResponse', displayE);
2424
+ } else {
2425
+ runCommonAsserts(data, error);
2426
+ }
2427
+ saveMockData('20130401', 'deleteTrafficPolicyInstance', 'default', data);
2428
+ done();
2429
+ } catch (err) {
2430
+ log.error(`Test Failure: ${err}`);
2431
+ done(err);
2432
+ }
2433
+ });
2434
+ } catch (error) {
2435
+ log.error(`Adapter Exception: ${error}`);
2436
+ done(error);
2437
+ }
2438
+ } else {
2439
+ log.error('deleteTrafficPolicyInstance task is false, skipping test');
2440
+ skipCount += 1;
2441
+ done();
2442
+ }// end if task
2443
+ }).timeout(attemptTimeout);
2444
+ });
2445
+
2446
+ describe('#Skipped test count', () => {
2447
+ it('count skipped tests', (done) => {
2448
+ console.log(`skipped ${skipCount} tests because \x1b[33mtask: false\x1b[0m`);
2449
+ done();
2450
+ });
2451
+ });
2452
+ });
2453
+ });