@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.
- package/.eslintignore +5 -0
- package/.eslintrc.js +18 -0
- package/.jshintrc +3 -0
- package/CHANGELOG.md +9 -0
- package/CODE_OF_CONDUCT.md +48 -0
- package/CONTRIBUTING.md +158 -0
- package/LICENSE +201 -0
- package/README.md +687 -0
- package/adapter.js +7594 -0
- package/adapterBase.js +1028 -0
- package/entities/.generic/action.json +109 -0
- package/entities/.generic/schema.json +23 -0
- package/entities/.system/action.json +50 -0
- package/entities/.system/mockdatafiles/getToken-default.json +3 -0
- package/entities/.system/mockdatafiles/healthcheck-default.json +3 -0
- package/entities/.system/schema.json +19 -0
- package/entities/.system/schemaTokenReq.json +53 -0
- package/entities/.system/schemaTokenResp.json +53 -0
- package/entities/20130401/action.json +1318 -0
- package/entities/20130401/schema.json +247 -0
- package/error.json +184 -0
- package/package.json +86 -0
- package/pronghorn.json +3445 -0
- package/propertiesSchema.json +840 -0
- package/refs?service=git-upload-pack +0 -0
- package/report/creationReport.json +492 -0
- package/report/route53-openapi.json-OpenApi3Json.json +15721 -0
- package/report/updateReport1646598657887.json +95 -0
- package/sampleProperties.json +106 -0
- package/test/integration/adapterTestBasicGet.js +85 -0
- package/test/integration/adapterTestConnectivity.js +93 -0
- package/test/integration/adapterTestIntegration.js +2453 -0
- package/test/unit/adapterBaseTestUnit.js +944 -0
- package/test/unit/adapterTestUnit.js +3446 -0
- package/utils/addAuth.js +94 -0
- package/utils/artifactize.js +146 -0
- package/utils/basicGet.js +50 -0
- package/utils/checkMigrate.js +63 -0
- package/utils/entitiesToDB.js +224 -0
- package/utils/findPath.js +74 -0
- package/utils/modify.js +154 -0
- package/utils/packModificationScript.js +35 -0
- package/utils/patches2bundledDeps.js +90 -0
- package/utils/pre-commit.sh +27 -0
- package/utils/removeHooks.js +20 -0
- package/utils/setup.js +33 -0
- package/utils/tbScript.js +169 -0
- package/utils/tbUtils.js +451 -0
- package/utils/testRunner.js +298 -0
- package/utils/troubleshootingAdapter.js +190 -0
- package/workflows/README.md +3 -0
|
@@ -0,0 +1,3446 @@
|
|
|
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-amazon_route53',
|
|
47
|
+
type: 'AmazonRoute53',
|
|
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 AmazonRoute53 = 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] Amazon_route53 Adapter Test', () => {
|
|
219
|
+
describe('AmazonRoute53 Class Tests', () => {
|
|
220
|
+
const a = new AmazonRoute53(
|
|
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('amazon_route53'));
|
|
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 utils/setup.js && npm install --package-lock-only --ignore-scripts && npx npm-force-resolutions', packageDotJson.scripts.preinstall);
|
|
360
|
+
assert.equal('node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js', packageDotJson.scripts.lint);
|
|
361
|
+
assert.equal('node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js --quiet', packageDotJson.scripts['lint:errors']);
|
|
362
|
+
assert.equal('mocha test/unit/adapterBaseTestUnit.js --LOG=error', packageDotJson.scripts['test:baseunit']);
|
|
363
|
+
assert.equal('mocha test/unit/adapterTestUnit.js --LOG=error', packageDotJson.scripts['test:unit']);
|
|
364
|
+
assert.equal('mocha test/integration/adapterTestIntegration.js --LOG=error', packageDotJson.scripts['test:integration']);
|
|
365
|
+
assert.equal('nyc --reporter html --reporter text mocha --reporter dot test/*', packageDotJson.scripts['test:cover']);
|
|
366
|
+
assert.equal('npm run test:baseunit && npm run test:unit && npm run test:integration', packageDotJson.scripts.test);
|
|
367
|
+
assert.equal('npm publish --registry=https://registry.npmjs.org --access=public', packageDotJson.scripts.deploy);
|
|
368
|
+
assert.equal('npm run deploy', packageDotJson.scripts.build);
|
|
369
|
+
done();
|
|
370
|
+
} catch (error) {
|
|
371
|
+
log.error(`Test Failure: ${error}`);
|
|
372
|
+
done(error);
|
|
373
|
+
}
|
|
374
|
+
});
|
|
375
|
+
it('package.json proper directories should be provided', (done) => {
|
|
376
|
+
try {
|
|
377
|
+
const packageDotJson = require('../../package.json');
|
|
378
|
+
assert.notEqual(undefined, packageDotJson.repository);
|
|
379
|
+
assert.notEqual(null, packageDotJson.repository);
|
|
380
|
+
assert.notEqual('', packageDotJson.repository);
|
|
381
|
+
assert.equal('git', packageDotJson.repository.type);
|
|
382
|
+
assert.equal('git@gitlab.com:itentialopensource/adapters/', packageDotJson.repository.url.substring(0, 43));
|
|
383
|
+
assert.equal('https://gitlab.com/itentialopensource/adapters/', packageDotJson.homepage.substring(0, 47));
|
|
384
|
+
done();
|
|
385
|
+
} catch (error) {
|
|
386
|
+
log.error(`Test Failure: ${error}`);
|
|
387
|
+
done(error);
|
|
388
|
+
}
|
|
389
|
+
});
|
|
390
|
+
it('package.json proper dependencies should be provided', (done) => {
|
|
391
|
+
try {
|
|
392
|
+
const packageDotJson = require('../../package.json');
|
|
393
|
+
assert.notEqual(undefined, packageDotJson.dependencies);
|
|
394
|
+
assert.notEqual(null, packageDotJson.dependencies);
|
|
395
|
+
assert.notEqual('', packageDotJson.dependencies);
|
|
396
|
+
assert.equal('^6.12.0', packageDotJson.dependencies.ajv);
|
|
397
|
+
assert.equal('^0.21.0', packageDotJson.dependencies.axios);
|
|
398
|
+
assert.equal('^2.20.0', packageDotJson.dependencies.commander);
|
|
399
|
+
assert.equal('^8.1.0', packageDotJson.dependencies['fs-extra']);
|
|
400
|
+
assert.equal('^9.0.1', packageDotJson.dependencies.mocha);
|
|
401
|
+
assert.equal('^2.0.1', packageDotJson.dependencies['mocha-param']);
|
|
402
|
+
assert.equal('^0.5.3', packageDotJson.dependencies['network-diagnostics']);
|
|
403
|
+
assert.equal('^15.1.0', packageDotJson.dependencies.nyc);
|
|
404
|
+
assert.equal('^1.4.10', packageDotJson.dependencies['readline-sync']);
|
|
405
|
+
assert.equal('^7.3.2', packageDotJson.dependencies.semver);
|
|
406
|
+
assert.equal('^3.3.3', packageDotJson.dependencies.winston);
|
|
407
|
+
done();
|
|
408
|
+
} catch (error) {
|
|
409
|
+
log.error(`Test Failure: ${error}`);
|
|
410
|
+
done(error);
|
|
411
|
+
}
|
|
412
|
+
});
|
|
413
|
+
it('package.json proper dev dependencies should be provided', (done) => {
|
|
414
|
+
try {
|
|
415
|
+
const packageDotJson = require('../../package.json');
|
|
416
|
+
assert.notEqual(undefined, packageDotJson.devDependencies);
|
|
417
|
+
assert.notEqual(null, packageDotJson.devDependencies);
|
|
418
|
+
assert.notEqual('', packageDotJson.devDependencies);
|
|
419
|
+
assert.equal('^4.3.4', packageDotJson.devDependencies.chai);
|
|
420
|
+
assert.equal('^7.29.0', packageDotJson.devDependencies.eslint);
|
|
421
|
+
assert.equal('^14.2.1', packageDotJson.devDependencies['eslint-config-airbnb-base']);
|
|
422
|
+
assert.equal('^2.23.4', packageDotJson.devDependencies['eslint-plugin-import']);
|
|
423
|
+
assert.equal('^3.0.0', packageDotJson.devDependencies['eslint-plugin-json']);
|
|
424
|
+
assert.equal('^0.6.3', packageDotJson.devDependencies['package-json-validator']);
|
|
425
|
+
assert.equal('^3.16.1', packageDotJson.devDependencies.testdouble);
|
|
426
|
+
done();
|
|
427
|
+
} catch (error) {
|
|
428
|
+
log.error(`Test Failure: ${error}`);
|
|
429
|
+
done(error);
|
|
430
|
+
}
|
|
431
|
+
});
|
|
432
|
+
});
|
|
433
|
+
|
|
434
|
+
describe('pronghorn.json', () => {
|
|
435
|
+
it('should have a pronghorn.json', (done) => {
|
|
436
|
+
try {
|
|
437
|
+
fs.exists('pronghorn.json', (val) => {
|
|
438
|
+
assert.equal(true, val);
|
|
439
|
+
done();
|
|
440
|
+
});
|
|
441
|
+
} catch (error) {
|
|
442
|
+
log.error(`Test Failure: ${error}`);
|
|
443
|
+
done(error);
|
|
444
|
+
}
|
|
445
|
+
});
|
|
446
|
+
it('pronghorn.json should be customized', (done) => {
|
|
447
|
+
try {
|
|
448
|
+
const pronghornDotJson = require('../../pronghorn.json');
|
|
449
|
+
assert.notEqual(-1, pronghornDotJson.id.indexOf('amazon_route53'));
|
|
450
|
+
assert.equal('Adapter', pronghornDotJson.type);
|
|
451
|
+
assert.equal('AmazonRoute53', pronghornDotJson.export);
|
|
452
|
+
assert.equal('Amazon_route53', pronghornDotJson.title);
|
|
453
|
+
assert.equal('adapter.js', pronghornDotJson.src);
|
|
454
|
+
done();
|
|
455
|
+
} catch (error) {
|
|
456
|
+
log.error(`Test Failure: ${error}`);
|
|
457
|
+
done(error);
|
|
458
|
+
}
|
|
459
|
+
});
|
|
460
|
+
it('pronghorn.json should contain generic adapter methods', (done) => {
|
|
461
|
+
try {
|
|
462
|
+
const pronghornDotJson = require('../../pronghorn.json');
|
|
463
|
+
assert.notEqual(undefined, pronghornDotJson.methods);
|
|
464
|
+
assert.notEqual(null, pronghornDotJson.methods);
|
|
465
|
+
assert.notEqual('', pronghornDotJson.methods);
|
|
466
|
+
assert.equal(true, Array.isArray(pronghornDotJson.methods));
|
|
467
|
+
assert.notEqual(0, pronghornDotJson.methods.length);
|
|
468
|
+
assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'updateAdapterConfiguration'));
|
|
469
|
+
assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'findPath'));
|
|
470
|
+
assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'troubleshoot'));
|
|
471
|
+
assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'runHealthcheck'));
|
|
472
|
+
assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'runConnectivity'));
|
|
473
|
+
assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'runBasicGet'));
|
|
474
|
+
assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'suspend'));
|
|
475
|
+
assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'unsuspend'));
|
|
476
|
+
assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'getQueue'));
|
|
477
|
+
assert.notEqual(undefined, pronghornDotJson.methods.find((e) => e.name === 'genericAdapterRequest'));
|
|
478
|
+
done();
|
|
479
|
+
} catch (error) {
|
|
480
|
+
log.error(`Test Failure: ${error}`);
|
|
481
|
+
done(error);
|
|
482
|
+
}
|
|
483
|
+
});
|
|
484
|
+
it('pronghorn.json should only expose workflow functions', (done) => {
|
|
485
|
+
try {
|
|
486
|
+
const pronghornDotJson = require('../../pronghorn.json');
|
|
487
|
+
|
|
488
|
+
for (let m = 0; m < pronghornDotJson.methods.length; m += 1) {
|
|
489
|
+
let found = false;
|
|
490
|
+
let paramissue = false;
|
|
491
|
+
|
|
492
|
+
for (let w = 0; w < wffunctions.length; w += 1) {
|
|
493
|
+
if (pronghornDotJson.methods[m].name === wffunctions[w]) {
|
|
494
|
+
found = true;
|
|
495
|
+
const methLine = execute(`grep " ${wffunctions[w]}(" adapter.js | grep "callback) {"`).toString();
|
|
496
|
+
let wfparams = [];
|
|
497
|
+
|
|
498
|
+
if (methLine && methLine.indexOf('(') >= 0 && methLine.indexOf(')') >= 0) {
|
|
499
|
+
const temp = methLine.substring(methLine.indexOf('(') + 1, methLine.lastIndexOf(')'));
|
|
500
|
+
wfparams = temp.split(',');
|
|
501
|
+
|
|
502
|
+
for (let t = 0; t < wfparams.length; t += 1) {
|
|
503
|
+
// remove default value from the parameter name
|
|
504
|
+
wfparams[t] = wfparams[t].substring(0, wfparams[t].search(/=/) > 0 ? wfparams[t].search(/#|\?|=/) : wfparams[t].length);
|
|
505
|
+
// remove spaces
|
|
506
|
+
wfparams[t] = wfparams[t].trim();
|
|
507
|
+
|
|
508
|
+
if (wfparams[t] === 'callback') {
|
|
509
|
+
wfparams.splice(t, 1);
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
// if there are inputs defined but not on the method line
|
|
515
|
+
if (wfparams.length === 0 && (pronghornDotJson.methods[m].input
|
|
516
|
+
&& pronghornDotJson.methods[m].input.length > 0)) {
|
|
517
|
+
paramissue = true;
|
|
518
|
+
} else if (wfparams.length > 0 && (!pronghornDotJson.methods[m].input
|
|
519
|
+
|| pronghornDotJson.methods[m].input.length === 0)) {
|
|
520
|
+
// if there are no inputs defined but there are on the method line
|
|
521
|
+
paramissue = true;
|
|
522
|
+
} else {
|
|
523
|
+
for (let p = 0; p < pronghornDotJson.methods[m].input.length; p += 1) {
|
|
524
|
+
let pfound = false;
|
|
525
|
+
for (let wfp = 0; wfp < wfparams.length; wfp += 1) {
|
|
526
|
+
if (pronghornDotJson.methods[m].input[p].name.toUpperCase() === wfparams[wfp].toUpperCase()) {
|
|
527
|
+
pfound = true;
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
if (!pfound) {
|
|
532
|
+
paramissue = true;
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
for (let wfp = 0; wfp < wfparams.length; wfp += 1) {
|
|
536
|
+
let pfound = false;
|
|
537
|
+
for (let p = 0; p < pronghornDotJson.methods[m].input.length; p += 1) {
|
|
538
|
+
if (pronghornDotJson.methods[m].input[p].name.toUpperCase() === wfparams[wfp].toUpperCase()) {
|
|
539
|
+
pfound = true;
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
if (!pfound) {
|
|
544
|
+
paramissue = true;
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
break;
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
if (!found) {
|
|
554
|
+
// this is the reason to go through both loops - log which ones are not found so
|
|
555
|
+
// they can be worked
|
|
556
|
+
log.error(`${pronghornDotJson.methods[m].name} not found in workflow functions`);
|
|
557
|
+
}
|
|
558
|
+
if (paramissue) {
|
|
559
|
+
// this is the reason to go through both loops - log which ones are not found so
|
|
560
|
+
// they can be worked
|
|
561
|
+
log.error(`${pronghornDotJson.methods[m].name} has a parameter mismatch`);
|
|
562
|
+
}
|
|
563
|
+
assert.equal(true, found);
|
|
564
|
+
assert.equal(false, paramissue);
|
|
565
|
+
}
|
|
566
|
+
done();
|
|
567
|
+
} catch (error) {
|
|
568
|
+
log.error(`Adapter Exception: ${error}`);
|
|
569
|
+
done(error);
|
|
570
|
+
}
|
|
571
|
+
}).timeout(attemptTimeout);
|
|
572
|
+
it('pronghorn.json should expose all workflow functions', (done) => {
|
|
573
|
+
try {
|
|
574
|
+
const pronghornDotJson = require('../../pronghorn.json');
|
|
575
|
+
for (let w = 0; w < wffunctions.length; w += 1) {
|
|
576
|
+
let found = false;
|
|
577
|
+
|
|
578
|
+
for (let m = 0; m < pronghornDotJson.methods.length; m += 1) {
|
|
579
|
+
if (pronghornDotJson.methods[m].name === wffunctions[w]) {
|
|
580
|
+
found = true;
|
|
581
|
+
break;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
if (!found) {
|
|
586
|
+
// this is the reason to go through both loops - log which ones are not found so
|
|
587
|
+
// they can be worked
|
|
588
|
+
log.error(`${wffunctions[w]} not found in pronghorn.json`);
|
|
589
|
+
}
|
|
590
|
+
assert.equal(true, found);
|
|
591
|
+
}
|
|
592
|
+
done();
|
|
593
|
+
} catch (error) {
|
|
594
|
+
log.error(`Adapter Exception: ${error}`);
|
|
595
|
+
done(error);
|
|
596
|
+
}
|
|
597
|
+
});
|
|
598
|
+
});
|
|
599
|
+
|
|
600
|
+
describe('propertiesSchema.json', () => {
|
|
601
|
+
it('should have a propertiesSchema.json', (done) => {
|
|
602
|
+
try {
|
|
603
|
+
fs.exists('propertiesSchema.json', (val) => {
|
|
604
|
+
assert.equal(true, val);
|
|
605
|
+
done();
|
|
606
|
+
});
|
|
607
|
+
} catch (error) {
|
|
608
|
+
log.error(`Test Failure: ${error}`);
|
|
609
|
+
done(error);
|
|
610
|
+
}
|
|
611
|
+
});
|
|
612
|
+
it('propertiesSchema.json should be customized', (done) => {
|
|
613
|
+
try {
|
|
614
|
+
const propertiesDotJson = require('../../propertiesSchema.json');
|
|
615
|
+
assert.equal('adapter-amazon_route53', propertiesDotJson.$id);
|
|
616
|
+
assert.equal('object', propertiesDotJson.type);
|
|
617
|
+
assert.equal('http://json-schema.org/draft-07/schema#', propertiesDotJson.$schema);
|
|
618
|
+
done();
|
|
619
|
+
} catch (error) {
|
|
620
|
+
log.error(`Test Failure: ${error}`);
|
|
621
|
+
done(error);
|
|
622
|
+
}
|
|
623
|
+
});
|
|
624
|
+
it('propertiesSchema.json should contain generic adapter properties', (done) => {
|
|
625
|
+
try {
|
|
626
|
+
const propertiesDotJson = require('../../propertiesSchema.json');
|
|
627
|
+
assert.notEqual(undefined, propertiesDotJson.properties);
|
|
628
|
+
assert.notEqual(null, propertiesDotJson.properties);
|
|
629
|
+
assert.notEqual('', propertiesDotJson.properties);
|
|
630
|
+
assert.equal('string', propertiesDotJson.properties.host.type);
|
|
631
|
+
assert.equal('integer', propertiesDotJson.properties.port.type);
|
|
632
|
+
assert.equal('boolean', propertiesDotJson.properties.stub.type);
|
|
633
|
+
assert.notEqual(undefined, propertiesDotJson.definitions.authentication);
|
|
634
|
+
assert.notEqual(null, propertiesDotJson.definitions.authentication);
|
|
635
|
+
assert.notEqual('', propertiesDotJson.definitions.authentication);
|
|
636
|
+
assert.equal('string', propertiesDotJson.definitions.authentication.properties.auth_method.type);
|
|
637
|
+
assert.equal('string', propertiesDotJson.definitions.authentication.properties.username.type);
|
|
638
|
+
assert.equal('string', propertiesDotJson.definitions.authentication.properties.password.type);
|
|
639
|
+
assert.equal('string', propertiesDotJson.definitions.authentication.properties.token.type);
|
|
640
|
+
assert.equal('integer', propertiesDotJson.definitions.authentication.properties.invalid_token_error.type);
|
|
641
|
+
assert.equal('integer', propertiesDotJson.definitions.authentication.properties.token_timeout.type);
|
|
642
|
+
assert.equal('string', propertiesDotJson.definitions.authentication.properties.token_cache.type);
|
|
643
|
+
assert.equal(true, Array.isArray(propertiesDotJson.definitions.authentication.properties.auth_field.type));
|
|
644
|
+
assert.equal(true, Array.isArray(propertiesDotJson.definitions.authentication.properties.auth_field_format.type));
|
|
645
|
+
assert.equal('boolean', propertiesDotJson.definitions.authentication.properties.auth_logging.type);
|
|
646
|
+
assert.equal('string', propertiesDotJson.definitions.authentication.properties.client_id.type);
|
|
647
|
+
assert.equal('string', propertiesDotJson.definitions.authentication.properties.client_secret.type);
|
|
648
|
+
assert.equal('string', propertiesDotJson.definitions.authentication.properties.grant_type.type);
|
|
649
|
+
assert.notEqual('', propertiesDotJson.definitions.ssl);
|
|
650
|
+
assert.equal('string', propertiesDotJson.definitions.ssl.properties.ecdhCurve.type);
|
|
651
|
+
assert.equal('boolean', propertiesDotJson.definitions.ssl.properties.enabled.type);
|
|
652
|
+
assert.equal('boolean', propertiesDotJson.definitions.ssl.properties.accept_invalid_cert.type);
|
|
653
|
+
assert.equal('string', propertiesDotJson.definitions.ssl.properties.ca_file.type);
|
|
654
|
+
assert.equal('string', propertiesDotJson.definitions.ssl.properties.key_file.type);
|
|
655
|
+
assert.equal('string', propertiesDotJson.definitions.ssl.properties.cert_file.type);
|
|
656
|
+
assert.equal('string', propertiesDotJson.definitions.ssl.properties.secure_protocol.type);
|
|
657
|
+
assert.equal('string', propertiesDotJson.definitions.ssl.properties.ciphers.type);
|
|
658
|
+
assert.equal('string', propertiesDotJson.properties.base_path.type);
|
|
659
|
+
assert.equal('string', propertiesDotJson.properties.version.type);
|
|
660
|
+
assert.equal('string', propertiesDotJson.properties.cache_location.type);
|
|
661
|
+
assert.equal('boolean', propertiesDotJson.properties.encode_pathvars.type);
|
|
662
|
+
assert.equal(true, Array.isArray(propertiesDotJson.properties.save_metric.type));
|
|
663
|
+
assert.equal('string', propertiesDotJson.properties.protocol.type);
|
|
664
|
+
assert.notEqual(undefined, propertiesDotJson.definitions);
|
|
665
|
+
assert.notEqual(null, propertiesDotJson.definitions);
|
|
666
|
+
assert.notEqual('', propertiesDotJson.definitions);
|
|
667
|
+
assert.notEqual(undefined, propertiesDotJson.definitions.healthcheck);
|
|
668
|
+
assert.notEqual(null, propertiesDotJson.definitions.healthcheck);
|
|
669
|
+
assert.notEqual('', propertiesDotJson.definitions.healthcheck);
|
|
670
|
+
assert.equal('string', propertiesDotJson.definitions.healthcheck.properties.type.type);
|
|
671
|
+
assert.equal('integer', propertiesDotJson.definitions.healthcheck.properties.frequency.type);
|
|
672
|
+
assert.equal('object', propertiesDotJson.definitions.healthcheck.properties.query_object.type);
|
|
673
|
+
assert.notEqual(undefined, propertiesDotJson.definitions.throttle);
|
|
674
|
+
assert.notEqual(null, propertiesDotJson.definitions.throttle);
|
|
675
|
+
assert.notEqual('', propertiesDotJson.definitions.throttle);
|
|
676
|
+
assert.equal('boolean', propertiesDotJson.definitions.throttle.properties.throttle_enabled.type);
|
|
677
|
+
assert.equal('integer', propertiesDotJson.definitions.throttle.properties.number_pronghorns.type);
|
|
678
|
+
assert.equal('string', propertiesDotJson.definitions.throttle.properties.sync_async.type);
|
|
679
|
+
assert.equal('integer', propertiesDotJson.definitions.throttle.properties.max_in_queue.type);
|
|
680
|
+
assert.equal('integer', propertiesDotJson.definitions.throttle.properties.concurrent_max.type);
|
|
681
|
+
assert.equal('integer', propertiesDotJson.definitions.throttle.properties.expire_timeout.type);
|
|
682
|
+
assert.equal('integer', propertiesDotJson.definitions.throttle.properties.avg_runtime.type);
|
|
683
|
+
assert.equal('array', propertiesDotJson.definitions.throttle.properties.priorities.type);
|
|
684
|
+
assert.notEqual(undefined, propertiesDotJson.definitions.request);
|
|
685
|
+
assert.notEqual(null, propertiesDotJson.definitions.request);
|
|
686
|
+
assert.notEqual('', propertiesDotJson.definitions.request);
|
|
687
|
+
assert.equal('integer', propertiesDotJson.definitions.request.properties.number_redirects.type);
|
|
688
|
+
assert.equal('integer', propertiesDotJson.definitions.request.properties.number_retries.type);
|
|
689
|
+
assert.equal(true, Array.isArray(propertiesDotJson.definitions.request.properties.limit_retry_error.type));
|
|
690
|
+
assert.equal('array', propertiesDotJson.definitions.request.properties.failover_codes.type);
|
|
691
|
+
assert.equal('integer', propertiesDotJson.definitions.request.properties.attempt_timeout.type);
|
|
692
|
+
assert.equal('object', propertiesDotJson.definitions.request.properties.global_request.type);
|
|
693
|
+
assert.equal('object', propertiesDotJson.definitions.request.properties.global_request.properties.payload.type);
|
|
694
|
+
assert.equal('object', propertiesDotJson.definitions.request.properties.global_request.properties.uriOptions.type);
|
|
695
|
+
assert.equal('object', propertiesDotJson.definitions.request.properties.global_request.properties.addlHeaders.type);
|
|
696
|
+
assert.equal('object', propertiesDotJson.definitions.request.properties.global_request.properties.authData.type);
|
|
697
|
+
assert.equal('boolean', propertiesDotJson.definitions.request.properties.healthcheck_on_timeout.type);
|
|
698
|
+
assert.equal('boolean', propertiesDotJson.definitions.request.properties.return_raw.type);
|
|
699
|
+
assert.equal('boolean', propertiesDotJson.definitions.request.properties.archiving.type);
|
|
700
|
+
assert.equal('boolean', propertiesDotJson.definitions.request.properties.return_request.type);
|
|
701
|
+
assert.notEqual(undefined, propertiesDotJson.definitions.proxy);
|
|
702
|
+
assert.notEqual(null, propertiesDotJson.definitions.proxy);
|
|
703
|
+
assert.notEqual('', propertiesDotJson.definitions.proxy);
|
|
704
|
+
assert.equal('boolean', propertiesDotJson.definitions.proxy.properties.enabled.type);
|
|
705
|
+
assert.equal('string', propertiesDotJson.definitions.proxy.properties.host.type);
|
|
706
|
+
assert.equal('integer', propertiesDotJson.definitions.proxy.properties.port.type);
|
|
707
|
+
assert.equal('string', propertiesDotJson.definitions.proxy.properties.protocol.type);
|
|
708
|
+
assert.equal('string', propertiesDotJson.definitions.proxy.properties.username.type);
|
|
709
|
+
assert.equal('string', propertiesDotJson.definitions.proxy.properties.password.type);
|
|
710
|
+
assert.notEqual(undefined, propertiesDotJson.definitions.ssl);
|
|
711
|
+
assert.notEqual(null, propertiesDotJson.definitions.ssl);
|
|
712
|
+
assert.notEqual(undefined, propertiesDotJson.definitions.mongo);
|
|
713
|
+
assert.notEqual(null, propertiesDotJson.definitions.mongo);
|
|
714
|
+
assert.notEqual('', propertiesDotJson.definitions.mongo);
|
|
715
|
+
assert.equal('string', propertiesDotJson.definitions.mongo.properties.host.type);
|
|
716
|
+
assert.equal('integer', propertiesDotJson.definitions.mongo.properties.port.type);
|
|
717
|
+
assert.equal('string', propertiesDotJson.definitions.mongo.properties.database.type);
|
|
718
|
+
assert.equal('string', propertiesDotJson.definitions.mongo.properties.username.type);
|
|
719
|
+
assert.equal('string', propertiesDotJson.definitions.mongo.properties.password.type);
|
|
720
|
+
assert.equal('string', propertiesDotJson.definitions.mongo.properties.replSet.type);
|
|
721
|
+
assert.equal('object', propertiesDotJson.definitions.mongo.properties.db_ssl.type);
|
|
722
|
+
assert.equal('boolean', propertiesDotJson.definitions.mongo.properties.db_ssl.properties.enabled.type);
|
|
723
|
+
assert.equal('boolean', propertiesDotJson.definitions.mongo.properties.db_ssl.properties.accept_invalid_cert.type);
|
|
724
|
+
assert.equal('string', propertiesDotJson.definitions.mongo.properties.db_ssl.properties.ca_file.type);
|
|
725
|
+
assert.equal('string', propertiesDotJson.definitions.mongo.properties.db_ssl.properties.key_file.type);
|
|
726
|
+
assert.equal('string', propertiesDotJson.definitions.mongo.properties.db_ssl.properties.cert_file.type);
|
|
727
|
+
done();
|
|
728
|
+
} catch (error) {
|
|
729
|
+
log.error(`Test Failure: ${error}`);
|
|
730
|
+
done(error);
|
|
731
|
+
}
|
|
732
|
+
});
|
|
733
|
+
});
|
|
734
|
+
|
|
735
|
+
describe('error.json', () => {
|
|
736
|
+
it('should have an error.json', (done) => {
|
|
737
|
+
try {
|
|
738
|
+
fs.exists('error.json', (val) => {
|
|
739
|
+
assert.equal(true, val);
|
|
740
|
+
done();
|
|
741
|
+
});
|
|
742
|
+
} catch (error) {
|
|
743
|
+
log.error(`Test Failure: ${error}`);
|
|
744
|
+
done(error);
|
|
745
|
+
}
|
|
746
|
+
});
|
|
747
|
+
it('error.json should have standard adapter errors', (done) => {
|
|
748
|
+
try {
|
|
749
|
+
const errorDotJson = require('../../error.json');
|
|
750
|
+
assert.notEqual(undefined, errorDotJson.errors);
|
|
751
|
+
assert.notEqual(null, errorDotJson.errors);
|
|
752
|
+
assert.notEqual('', errorDotJson.errors);
|
|
753
|
+
assert.equal(true, Array.isArray(errorDotJson.errors));
|
|
754
|
+
assert.notEqual(0, errorDotJson.errors.length);
|
|
755
|
+
assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.100'));
|
|
756
|
+
assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.101'));
|
|
757
|
+
assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.102'));
|
|
758
|
+
assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.110'));
|
|
759
|
+
assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.111'));
|
|
760
|
+
assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.112'));
|
|
761
|
+
assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.113'));
|
|
762
|
+
assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.114'));
|
|
763
|
+
assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.115'));
|
|
764
|
+
assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.116'));
|
|
765
|
+
assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.300'));
|
|
766
|
+
assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.301'));
|
|
767
|
+
assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.302'));
|
|
768
|
+
assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.303'));
|
|
769
|
+
assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.304'));
|
|
770
|
+
assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.305'));
|
|
771
|
+
assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.310'));
|
|
772
|
+
assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.311'));
|
|
773
|
+
assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.312'));
|
|
774
|
+
assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.320'));
|
|
775
|
+
assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.321'));
|
|
776
|
+
assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.400'));
|
|
777
|
+
assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.401'));
|
|
778
|
+
assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.402'));
|
|
779
|
+
assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.500'));
|
|
780
|
+
assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.501'));
|
|
781
|
+
assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.502'));
|
|
782
|
+
assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.503'));
|
|
783
|
+
assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.600'));
|
|
784
|
+
assert.notEqual(undefined, errorDotJson.errors.find((e) => e.icode === 'AD.900'));
|
|
785
|
+
done();
|
|
786
|
+
} catch (error) {
|
|
787
|
+
log.error(`Test Failure: ${error}`);
|
|
788
|
+
done(error);
|
|
789
|
+
}
|
|
790
|
+
});
|
|
791
|
+
});
|
|
792
|
+
|
|
793
|
+
describe('sampleProperties.json', () => {
|
|
794
|
+
it('should have a sampleProperties.json', (done) => {
|
|
795
|
+
try {
|
|
796
|
+
fs.exists('sampleProperties.json', (val) => {
|
|
797
|
+
assert.equal(true, val);
|
|
798
|
+
done();
|
|
799
|
+
});
|
|
800
|
+
} catch (error) {
|
|
801
|
+
log.error(`Test Failure: ${error}`);
|
|
802
|
+
done(error);
|
|
803
|
+
}
|
|
804
|
+
});
|
|
805
|
+
it('sampleProperties.json should contain generic adapter properties', (done) => {
|
|
806
|
+
try {
|
|
807
|
+
const sampleDotJson = require('../../sampleProperties.json');
|
|
808
|
+
assert.notEqual(-1, sampleDotJson.id.indexOf('amazon_route53'));
|
|
809
|
+
assert.equal('AmazonRoute53', sampleDotJson.type);
|
|
810
|
+
assert.notEqual(undefined, sampleDotJson.properties);
|
|
811
|
+
assert.notEqual(null, sampleDotJson.properties);
|
|
812
|
+
assert.notEqual('', sampleDotJson.properties);
|
|
813
|
+
assert.notEqual(undefined, sampleDotJson.properties.host);
|
|
814
|
+
assert.notEqual(undefined, sampleDotJson.properties.port);
|
|
815
|
+
assert.notEqual(undefined, sampleDotJson.properties.stub);
|
|
816
|
+
assert.notEqual(undefined, sampleDotJson.properties.authentication);
|
|
817
|
+
assert.notEqual(null, sampleDotJson.properties.authentication);
|
|
818
|
+
assert.notEqual('', sampleDotJson.properties.authentication);
|
|
819
|
+
assert.notEqual(undefined, sampleDotJson.properties.authentication.auth_method);
|
|
820
|
+
assert.notEqual(undefined, sampleDotJson.properties.authentication.username);
|
|
821
|
+
assert.notEqual(undefined, sampleDotJson.properties.authentication.password);
|
|
822
|
+
assert.notEqual(undefined, sampleDotJson.properties.authentication.token);
|
|
823
|
+
assert.notEqual(undefined, sampleDotJson.properties.authentication.invalid_token_error);
|
|
824
|
+
assert.notEqual(undefined, sampleDotJson.properties.authentication.token_timeout);
|
|
825
|
+
assert.notEqual(undefined, sampleDotJson.properties.authentication.token_cache);
|
|
826
|
+
assert.notEqual(undefined, sampleDotJson.properties.authentication.auth_field);
|
|
827
|
+
assert.notEqual(undefined, sampleDotJson.properties.authentication.auth_field_format);
|
|
828
|
+
assert.notEqual(undefined, sampleDotJson.properties.authentication.auth_logging);
|
|
829
|
+
assert.notEqual(undefined, sampleDotJson.properties.authentication.client_id);
|
|
830
|
+
assert.notEqual(undefined, sampleDotJson.properties.authentication.client_secret);
|
|
831
|
+
assert.notEqual(undefined, sampleDotJson.properties.authentication.grant_type);
|
|
832
|
+
assert.notEqual(undefined, sampleDotJson.properties.ssl);
|
|
833
|
+
assert.notEqual(null, sampleDotJson.properties.ssl);
|
|
834
|
+
assert.notEqual('', sampleDotJson.properties.ssl);
|
|
835
|
+
assert.notEqual(undefined, sampleDotJson.properties.ssl.ecdhCurve);
|
|
836
|
+
assert.notEqual(undefined, sampleDotJson.properties.ssl.enabled);
|
|
837
|
+
assert.notEqual(undefined, sampleDotJson.properties.ssl.accept_invalid_cert);
|
|
838
|
+
assert.notEqual(undefined, sampleDotJson.properties.ssl.ca_file);
|
|
839
|
+
assert.notEqual(undefined, sampleDotJson.properties.ssl.key_file);
|
|
840
|
+
assert.notEqual(undefined, sampleDotJson.properties.ssl.cert_file);
|
|
841
|
+
assert.notEqual(undefined, sampleDotJson.properties.ssl.secure_protocol);
|
|
842
|
+
assert.notEqual(undefined, sampleDotJson.properties.ssl.ciphers);
|
|
843
|
+
|
|
844
|
+
assert.notEqual(undefined, sampleDotJson.properties.base_path);
|
|
845
|
+
assert.notEqual(undefined, sampleDotJson.properties.version);
|
|
846
|
+
assert.notEqual(undefined, sampleDotJson.properties.cache_location);
|
|
847
|
+
assert.notEqual(undefined, sampleDotJson.properties.encode_pathvars);
|
|
848
|
+
assert.notEqual(undefined, sampleDotJson.properties.save_metric);
|
|
849
|
+
assert.notEqual(undefined, sampleDotJson.properties.protocol);
|
|
850
|
+
assert.notEqual(undefined, sampleDotJson.properties.stub);
|
|
851
|
+
assert.notEqual(undefined, sampleDotJson.properties.stub);
|
|
852
|
+
assert.notEqual(undefined, sampleDotJson.properties.stub);
|
|
853
|
+
assert.notEqual(undefined, sampleDotJson.properties.stub);
|
|
854
|
+
assert.notEqual(undefined, sampleDotJson.properties.healthcheck);
|
|
855
|
+
assert.notEqual(null, sampleDotJson.properties.healthcheck);
|
|
856
|
+
assert.notEqual('', sampleDotJson.properties.healthcheck);
|
|
857
|
+
assert.notEqual(undefined, sampleDotJson.properties.healthcheck.type);
|
|
858
|
+
assert.notEqual(undefined, sampleDotJson.properties.healthcheck.frequency);
|
|
859
|
+
assert.notEqual(undefined, sampleDotJson.properties.healthcheck.query_object);
|
|
860
|
+
assert.notEqual(undefined, sampleDotJson.properties.throttle);
|
|
861
|
+
assert.notEqual(null, sampleDotJson.properties.throttle);
|
|
862
|
+
assert.notEqual('', sampleDotJson.properties.throttle);
|
|
863
|
+
assert.notEqual(undefined, sampleDotJson.properties.throttle.throttle_enabled);
|
|
864
|
+
assert.notEqual(undefined, sampleDotJson.properties.throttle.number_pronghorns);
|
|
865
|
+
assert.notEqual(undefined, sampleDotJson.properties.throttle.sync_async);
|
|
866
|
+
assert.notEqual(undefined, sampleDotJson.properties.throttle.max_in_queue);
|
|
867
|
+
assert.notEqual(undefined, sampleDotJson.properties.throttle.concurrent_max);
|
|
868
|
+
assert.notEqual(undefined, sampleDotJson.properties.throttle.expire_timeout);
|
|
869
|
+
assert.notEqual(undefined, sampleDotJson.properties.throttle.avg_runtime);
|
|
870
|
+
assert.notEqual(undefined, sampleDotJson.properties.throttle.priorities);
|
|
871
|
+
assert.notEqual(undefined, sampleDotJson.properties.request);
|
|
872
|
+
assert.notEqual(null, sampleDotJson.properties.request);
|
|
873
|
+
assert.notEqual('', sampleDotJson.properties.request);
|
|
874
|
+
assert.notEqual(undefined, sampleDotJson.properties.request.number_redirects);
|
|
875
|
+
assert.notEqual(undefined, sampleDotJson.properties.request.number_retries);
|
|
876
|
+
assert.notEqual(undefined, sampleDotJson.properties.request.limit_retry_error);
|
|
877
|
+
assert.notEqual(undefined, sampleDotJson.properties.request.failover_codes);
|
|
878
|
+
assert.notEqual(undefined, sampleDotJson.properties.request.attempt_timeout);
|
|
879
|
+
assert.notEqual(undefined, sampleDotJson.properties.request.global_request);
|
|
880
|
+
assert.notEqual(undefined, sampleDotJson.properties.request.global_request.payload);
|
|
881
|
+
assert.notEqual(undefined, sampleDotJson.properties.request.global_request.uriOptions);
|
|
882
|
+
assert.notEqual(undefined, sampleDotJson.properties.request.global_request.addlHeaders);
|
|
883
|
+
assert.notEqual(undefined, sampleDotJson.properties.request.global_request.authData);
|
|
884
|
+
assert.notEqual(undefined, sampleDotJson.properties.request.healthcheck_on_timeout);
|
|
885
|
+
assert.notEqual(undefined, sampleDotJson.properties.request.return_raw);
|
|
886
|
+
assert.notEqual(undefined, sampleDotJson.properties.request.archiving);
|
|
887
|
+
assert.notEqual(undefined, sampleDotJson.properties.request.return_request);
|
|
888
|
+
assert.notEqual(undefined, sampleDotJson.properties.proxy);
|
|
889
|
+
assert.notEqual(null, sampleDotJson.properties.proxy);
|
|
890
|
+
assert.notEqual('', sampleDotJson.properties.proxy);
|
|
891
|
+
assert.notEqual(undefined, sampleDotJson.properties.proxy.enabled);
|
|
892
|
+
assert.notEqual(undefined, sampleDotJson.properties.proxy.host);
|
|
893
|
+
assert.notEqual(undefined, sampleDotJson.properties.proxy.port);
|
|
894
|
+
assert.notEqual(undefined, sampleDotJson.properties.proxy.protocol);
|
|
895
|
+
assert.notEqual(undefined, sampleDotJson.properties.proxy.username);
|
|
896
|
+
assert.notEqual(undefined, sampleDotJson.properties.proxy.password);
|
|
897
|
+
assert.notEqual(undefined, sampleDotJson.properties.mongo);
|
|
898
|
+
assert.notEqual(null, sampleDotJson.properties.mongo);
|
|
899
|
+
assert.notEqual('', sampleDotJson.properties.mongo);
|
|
900
|
+
assert.notEqual(undefined, sampleDotJson.properties.mongo.host);
|
|
901
|
+
assert.notEqual(undefined, sampleDotJson.properties.mongo.port);
|
|
902
|
+
assert.notEqual(undefined, sampleDotJson.properties.mongo.database);
|
|
903
|
+
assert.notEqual(undefined, sampleDotJson.properties.mongo.username);
|
|
904
|
+
assert.notEqual(undefined, sampleDotJson.properties.mongo.password);
|
|
905
|
+
assert.notEqual(undefined, sampleDotJson.properties.mongo.replSet);
|
|
906
|
+
assert.notEqual(undefined, sampleDotJson.properties.mongo.db_ssl);
|
|
907
|
+
assert.notEqual(undefined, sampleDotJson.properties.mongo.db_ssl.enabled);
|
|
908
|
+
assert.notEqual(undefined, sampleDotJson.properties.mongo.db_ssl.accept_invalid_cert);
|
|
909
|
+
assert.notEqual(undefined, sampleDotJson.properties.mongo.db_ssl.ca_file);
|
|
910
|
+
assert.notEqual(undefined, sampleDotJson.properties.mongo.db_ssl.key_file);
|
|
911
|
+
assert.notEqual(undefined, sampleDotJson.properties.mongo.db_ssl.cert_file);
|
|
912
|
+
done();
|
|
913
|
+
} catch (error) {
|
|
914
|
+
log.error(`Test Failure: ${error}`);
|
|
915
|
+
done(error);
|
|
916
|
+
}
|
|
917
|
+
});
|
|
918
|
+
});
|
|
919
|
+
|
|
920
|
+
describe('#checkProperties', () => {
|
|
921
|
+
it('should have a checkProperties function', (done) => {
|
|
922
|
+
try {
|
|
923
|
+
assert.equal(true, typeof a.checkProperties === 'function');
|
|
924
|
+
done();
|
|
925
|
+
} catch (error) {
|
|
926
|
+
log.error(`Test Failure: ${error}`);
|
|
927
|
+
done(error);
|
|
928
|
+
}
|
|
929
|
+
});
|
|
930
|
+
it('the sample properties should be good - if failure change the log level', (done) => {
|
|
931
|
+
try {
|
|
932
|
+
const samplePropsJson = require('../../sampleProperties.json');
|
|
933
|
+
const clean = a.checkProperties(samplePropsJson.properties);
|
|
934
|
+
|
|
935
|
+
try {
|
|
936
|
+
assert.notEqual(0, Object.keys(clean));
|
|
937
|
+
assert.equal(undefined, clean.exception);
|
|
938
|
+
assert.notEqual(undefined, clean.host);
|
|
939
|
+
assert.notEqual(null, clean.host);
|
|
940
|
+
assert.notEqual('', clean.host);
|
|
941
|
+
done();
|
|
942
|
+
} catch (err) {
|
|
943
|
+
log.error(`Test Failure: ${err}`);
|
|
944
|
+
done(err);
|
|
945
|
+
}
|
|
946
|
+
} catch (error) {
|
|
947
|
+
log.error(`Adapter Exception: ${error}`);
|
|
948
|
+
done(error);
|
|
949
|
+
}
|
|
950
|
+
}).timeout(attemptTimeout);
|
|
951
|
+
});
|
|
952
|
+
|
|
953
|
+
describe('README.md', () => {
|
|
954
|
+
it('should have a README', (done) => {
|
|
955
|
+
try {
|
|
956
|
+
fs.exists('README.md', (val) => {
|
|
957
|
+
assert.equal(true, val);
|
|
958
|
+
done();
|
|
959
|
+
});
|
|
960
|
+
} catch (error) {
|
|
961
|
+
log.error(`Test Failure: ${error}`);
|
|
962
|
+
done(error);
|
|
963
|
+
}
|
|
964
|
+
});
|
|
965
|
+
it('README.md should be customized', (done) => {
|
|
966
|
+
try {
|
|
967
|
+
fs.readFile('README.md', 'utf8', (err, data) => {
|
|
968
|
+
assert.equal(-1, data.indexOf('[System]'));
|
|
969
|
+
assert.equal(-1, data.indexOf('[system]'));
|
|
970
|
+
assert.equal(-1, data.indexOf('[version]'));
|
|
971
|
+
assert.equal(-1, data.indexOf('[namespace]'));
|
|
972
|
+
done();
|
|
973
|
+
});
|
|
974
|
+
} catch (error) {
|
|
975
|
+
log.error(`Test Failure: ${error}`);
|
|
976
|
+
done(error);
|
|
977
|
+
}
|
|
978
|
+
});
|
|
979
|
+
});
|
|
980
|
+
|
|
981
|
+
describe('#connect', () => {
|
|
982
|
+
it('should have a connect function', (done) => {
|
|
983
|
+
try {
|
|
984
|
+
assert.equal(true, typeof a.connect === 'function');
|
|
985
|
+
done();
|
|
986
|
+
} catch (error) {
|
|
987
|
+
log.error(`Test Failure: ${error}`);
|
|
988
|
+
done(error);
|
|
989
|
+
}
|
|
990
|
+
});
|
|
991
|
+
});
|
|
992
|
+
|
|
993
|
+
describe('#healthCheck', () => {
|
|
994
|
+
it('should have a healthCheck function', (done) => {
|
|
995
|
+
try {
|
|
996
|
+
assert.equal(true, typeof a.healthCheck === 'function');
|
|
997
|
+
done();
|
|
998
|
+
} catch (error) {
|
|
999
|
+
log.error(`Test Failure: ${error}`);
|
|
1000
|
+
done(error);
|
|
1001
|
+
}
|
|
1002
|
+
});
|
|
1003
|
+
});
|
|
1004
|
+
|
|
1005
|
+
describe('#updateAdapterConfiguration', () => {
|
|
1006
|
+
it('should have a updateAdapterConfiguration function', (done) => {
|
|
1007
|
+
try {
|
|
1008
|
+
assert.equal(true, typeof a.updateAdapterConfiguration === 'function');
|
|
1009
|
+
done();
|
|
1010
|
+
} catch (error) {
|
|
1011
|
+
log.error(`Test Failure: ${error}`);
|
|
1012
|
+
done(error);
|
|
1013
|
+
}
|
|
1014
|
+
});
|
|
1015
|
+
});
|
|
1016
|
+
|
|
1017
|
+
describe('#findPath', () => {
|
|
1018
|
+
it('should have a findPath function', (done) => {
|
|
1019
|
+
try {
|
|
1020
|
+
assert.equal(true, typeof a.findPath === 'function');
|
|
1021
|
+
done();
|
|
1022
|
+
} catch (error) {
|
|
1023
|
+
log.error(`Test Failure: ${error}`);
|
|
1024
|
+
done(error);
|
|
1025
|
+
}
|
|
1026
|
+
});
|
|
1027
|
+
it('findPath should find atleast one path that matches', (done) => {
|
|
1028
|
+
try {
|
|
1029
|
+
a.findPath('{base_path}/{version}', (data, error) => {
|
|
1030
|
+
try {
|
|
1031
|
+
assert.equal(undefined, error);
|
|
1032
|
+
assert.notEqual(undefined, data);
|
|
1033
|
+
assert.notEqual(null, data);
|
|
1034
|
+
assert.equal(true, data.found);
|
|
1035
|
+
assert.notEqual(undefined, data.foundIn);
|
|
1036
|
+
assert.notEqual(null, data.foundIn);
|
|
1037
|
+
assert.notEqual(0, data.foundIn.length);
|
|
1038
|
+
done();
|
|
1039
|
+
} catch (err) {
|
|
1040
|
+
log.error(`Test Failure: ${err}`);
|
|
1041
|
+
done(err);
|
|
1042
|
+
}
|
|
1043
|
+
});
|
|
1044
|
+
} catch (error) {
|
|
1045
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1046
|
+
done(error);
|
|
1047
|
+
}
|
|
1048
|
+
}).timeout(attemptTimeout);
|
|
1049
|
+
});
|
|
1050
|
+
|
|
1051
|
+
describe('#suspend', () => {
|
|
1052
|
+
it('should have a suspend function', (done) => {
|
|
1053
|
+
try {
|
|
1054
|
+
assert.equal(true, typeof a.suspend === 'function');
|
|
1055
|
+
done();
|
|
1056
|
+
} catch (error) {
|
|
1057
|
+
log.error(`Test Failure: ${error}`);
|
|
1058
|
+
done(error);
|
|
1059
|
+
}
|
|
1060
|
+
});
|
|
1061
|
+
});
|
|
1062
|
+
|
|
1063
|
+
describe('#unsuspend', () => {
|
|
1064
|
+
it('should have a unsuspend function', (done) => {
|
|
1065
|
+
try {
|
|
1066
|
+
assert.equal(true, typeof a.unsuspend === 'function');
|
|
1067
|
+
done();
|
|
1068
|
+
} catch (error) {
|
|
1069
|
+
log.error(`Test Failure: ${error}`);
|
|
1070
|
+
done(error);
|
|
1071
|
+
}
|
|
1072
|
+
});
|
|
1073
|
+
});
|
|
1074
|
+
|
|
1075
|
+
describe('#getQueue', () => {
|
|
1076
|
+
it('should have a getQueue function', (done) => {
|
|
1077
|
+
try {
|
|
1078
|
+
assert.equal(true, typeof a.getQueue === 'function');
|
|
1079
|
+
done();
|
|
1080
|
+
} catch (error) {
|
|
1081
|
+
log.error(`Test Failure: ${error}`);
|
|
1082
|
+
done(error);
|
|
1083
|
+
}
|
|
1084
|
+
});
|
|
1085
|
+
});
|
|
1086
|
+
|
|
1087
|
+
describe('#troubleshoot', () => {
|
|
1088
|
+
it('should have a troubleshoot function', (done) => {
|
|
1089
|
+
try {
|
|
1090
|
+
assert.equal(true, typeof a.troubleshoot === 'function');
|
|
1091
|
+
done();
|
|
1092
|
+
} catch (error) {
|
|
1093
|
+
log.error(`Test Failure: ${error}`);
|
|
1094
|
+
done(error);
|
|
1095
|
+
}
|
|
1096
|
+
});
|
|
1097
|
+
});
|
|
1098
|
+
|
|
1099
|
+
describe('#runHealthcheck', () => {
|
|
1100
|
+
it('should have a runHealthcheck function', (done) => {
|
|
1101
|
+
try {
|
|
1102
|
+
assert.equal(true, typeof a.runHealthcheck === 'function');
|
|
1103
|
+
done();
|
|
1104
|
+
} catch (error) {
|
|
1105
|
+
log.error(`Test Failure: ${error}`);
|
|
1106
|
+
done(error);
|
|
1107
|
+
}
|
|
1108
|
+
});
|
|
1109
|
+
});
|
|
1110
|
+
|
|
1111
|
+
describe('#runConnectivity', () => {
|
|
1112
|
+
it('should have a runConnectivity function', (done) => {
|
|
1113
|
+
try {
|
|
1114
|
+
assert.equal(true, typeof a.runConnectivity === 'function');
|
|
1115
|
+
done();
|
|
1116
|
+
} catch (error) {
|
|
1117
|
+
log.error(`Test Failure: ${error}`);
|
|
1118
|
+
done(error);
|
|
1119
|
+
}
|
|
1120
|
+
});
|
|
1121
|
+
});
|
|
1122
|
+
|
|
1123
|
+
describe('#runBasicGet', () => {
|
|
1124
|
+
it('should have a runBasicGet function', (done) => {
|
|
1125
|
+
try {
|
|
1126
|
+
assert.equal(true, typeof a.runBasicGet === 'function');
|
|
1127
|
+
done();
|
|
1128
|
+
} catch (error) {
|
|
1129
|
+
log.error(`Test Failure: ${error}`);
|
|
1130
|
+
done(error);
|
|
1131
|
+
}
|
|
1132
|
+
});
|
|
1133
|
+
});
|
|
1134
|
+
|
|
1135
|
+
describe('#moveEntitiesToDB', () => {
|
|
1136
|
+
it('should have a moveEntitiesToDB function', (done) => {
|
|
1137
|
+
try {
|
|
1138
|
+
assert.equal(true, typeof a.moveEntitiesToDB === 'function');
|
|
1139
|
+
done();
|
|
1140
|
+
} catch (error) {
|
|
1141
|
+
log.error(`Test Failure: ${error}`);
|
|
1142
|
+
done(error);
|
|
1143
|
+
}
|
|
1144
|
+
});
|
|
1145
|
+
});
|
|
1146
|
+
|
|
1147
|
+
describe('#checkActionFiles', () => {
|
|
1148
|
+
it('should have a checkActionFiles function', (done) => {
|
|
1149
|
+
try {
|
|
1150
|
+
assert.equal(true, typeof a.checkActionFiles === 'function');
|
|
1151
|
+
done();
|
|
1152
|
+
} catch (error) {
|
|
1153
|
+
log.error(`Test Failure: ${error}`);
|
|
1154
|
+
done(error);
|
|
1155
|
+
}
|
|
1156
|
+
});
|
|
1157
|
+
it('the action files should be good - if failure change the log level as most issues are warnings', (done) => {
|
|
1158
|
+
try {
|
|
1159
|
+
const clean = a.checkActionFiles();
|
|
1160
|
+
|
|
1161
|
+
try {
|
|
1162
|
+
for (let c = 0; c < clean.length; c += 1) {
|
|
1163
|
+
log.error(clean[c]);
|
|
1164
|
+
}
|
|
1165
|
+
assert.equal(0, clean.length);
|
|
1166
|
+
done();
|
|
1167
|
+
} catch (err) {
|
|
1168
|
+
log.error(`Test Failure: ${err}`);
|
|
1169
|
+
done(err);
|
|
1170
|
+
}
|
|
1171
|
+
} catch (error) {
|
|
1172
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1173
|
+
done(error);
|
|
1174
|
+
}
|
|
1175
|
+
}).timeout(attemptTimeout);
|
|
1176
|
+
});
|
|
1177
|
+
|
|
1178
|
+
describe('#encryptProperty', () => {
|
|
1179
|
+
it('should have a encryptProperty function', (done) => {
|
|
1180
|
+
try {
|
|
1181
|
+
assert.equal(true, typeof a.encryptProperty === 'function');
|
|
1182
|
+
done();
|
|
1183
|
+
} catch (error) {
|
|
1184
|
+
log.error(`Test Failure: ${error}`);
|
|
1185
|
+
done(error);
|
|
1186
|
+
}
|
|
1187
|
+
});
|
|
1188
|
+
it('should get base64 encoded property', (done) => {
|
|
1189
|
+
try {
|
|
1190
|
+
a.encryptProperty('testing', 'base64', (data, error) => {
|
|
1191
|
+
try {
|
|
1192
|
+
assert.equal(undefined, error);
|
|
1193
|
+
assert.notEqual(undefined, data);
|
|
1194
|
+
assert.notEqual(null, data);
|
|
1195
|
+
assert.notEqual(undefined, data.response);
|
|
1196
|
+
assert.notEqual(null, data.response);
|
|
1197
|
+
assert.equal(0, data.response.indexOf('{code}'));
|
|
1198
|
+
done();
|
|
1199
|
+
} catch (err) {
|
|
1200
|
+
log.error(`Test Failure: ${err}`);
|
|
1201
|
+
done(err);
|
|
1202
|
+
}
|
|
1203
|
+
});
|
|
1204
|
+
} catch (error) {
|
|
1205
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1206
|
+
done(error);
|
|
1207
|
+
}
|
|
1208
|
+
}).timeout(attemptTimeout);
|
|
1209
|
+
it('should get encrypted property', (done) => {
|
|
1210
|
+
try {
|
|
1211
|
+
a.encryptProperty('testing', 'encrypt', (data, error) => {
|
|
1212
|
+
try {
|
|
1213
|
+
assert.equal(undefined, error);
|
|
1214
|
+
assert.notEqual(undefined, data);
|
|
1215
|
+
assert.notEqual(null, data);
|
|
1216
|
+
assert.notEqual(undefined, data.response);
|
|
1217
|
+
assert.notEqual(null, data.response);
|
|
1218
|
+
assert.equal(0, data.response.indexOf('{crypt}'));
|
|
1219
|
+
done();
|
|
1220
|
+
} catch (err) {
|
|
1221
|
+
log.error(`Test Failure: ${err}`);
|
|
1222
|
+
done(err);
|
|
1223
|
+
}
|
|
1224
|
+
});
|
|
1225
|
+
} catch (error) {
|
|
1226
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1227
|
+
done(error);
|
|
1228
|
+
}
|
|
1229
|
+
}).timeout(attemptTimeout);
|
|
1230
|
+
});
|
|
1231
|
+
|
|
1232
|
+
// describe('#hasEntity', () => {
|
|
1233
|
+
// it('should have a hasEntity function', (done) => {
|
|
1234
|
+
// try {
|
|
1235
|
+
// assert.equal(true, typeof a.hasEntity === 'function');
|
|
1236
|
+
// done();
|
|
1237
|
+
// } catch (error) {
|
|
1238
|
+
// log.error(`Test Failure: ${error}`);
|
|
1239
|
+
// done(error);
|
|
1240
|
+
// }
|
|
1241
|
+
// });
|
|
1242
|
+
// it('should find entity', (done) => {
|
|
1243
|
+
// try {
|
|
1244
|
+
// a.hasEntity('template_entity', // 'a9e9c33dc61122760072455df62663d2', (data) => {
|
|
1245
|
+
// try {
|
|
1246
|
+
// assert.equal(true, data[0]);
|
|
1247
|
+
// done();
|
|
1248
|
+
// } catch (err) {
|
|
1249
|
+
// log.error(`Test Failure: ${err}`);
|
|
1250
|
+
// done(err);
|
|
1251
|
+
// }
|
|
1252
|
+
// });
|
|
1253
|
+
// } catch (error) {
|
|
1254
|
+
// log.error(`Adapter Exception: ${error}`);
|
|
1255
|
+
// done(error);
|
|
1256
|
+
// }
|
|
1257
|
+
// }).timeout(attemptTimeout);
|
|
1258
|
+
// it('should not find entity', (done) => {
|
|
1259
|
+
// try {
|
|
1260
|
+
// a.hasEntity('template_entity', 'blah', (data) => {
|
|
1261
|
+
// try {
|
|
1262
|
+
// assert.equal(false, data[0]);
|
|
1263
|
+
// done();
|
|
1264
|
+
// } catch (err) {
|
|
1265
|
+
// log.error(`Test Failure: ${err}`);
|
|
1266
|
+
// done(err);
|
|
1267
|
+
// }
|
|
1268
|
+
// });
|
|
1269
|
+
// } catch (error) {
|
|
1270
|
+
// log.error(`Adapter Exception: ${error}`);
|
|
1271
|
+
// done(error);
|
|
1272
|
+
// }
|
|
1273
|
+
// }).timeout(attemptTimeout);
|
|
1274
|
+
// });
|
|
1275
|
+
|
|
1276
|
+
describe('#hasEntities', () => {
|
|
1277
|
+
it('should have a hasEntities function', (done) => {
|
|
1278
|
+
try {
|
|
1279
|
+
assert.equal(true, typeof a.hasEntities === 'function');
|
|
1280
|
+
done();
|
|
1281
|
+
} catch (error) {
|
|
1282
|
+
log.error(`Test Failure: ${error}`);
|
|
1283
|
+
done(error);
|
|
1284
|
+
}
|
|
1285
|
+
});
|
|
1286
|
+
});
|
|
1287
|
+
|
|
1288
|
+
describe('#hasDevices', () => {
|
|
1289
|
+
it('should have a hasDevices function', (done) => {
|
|
1290
|
+
try {
|
|
1291
|
+
assert.equal(true, typeof a.hasDevices === 'function');
|
|
1292
|
+
done();
|
|
1293
|
+
} catch (error) {
|
|
1294
|
+
log.error(`Test Failure: ${error}`);
|
|
1295
|
+
done(error);
|
|
1296
|
+
}
|
|
1297
|
+
});
|
|
1298
|
+
});
|
|
1299
|
+
|
|
1300
|
+
describe('#getDevice', () => {
|
|
1301
|
+
it('should have a getDevice function', (done) => {
|
|
1302
|
+
try {
|
|
1303
|
+
assert.equal(true, typeof a.getDevice === 'function');
|
|
1304
|
+
done();
|
|
1305
|
+
} catch (error) {
|
|
1306
|
+
log.error(`Test Failure: ${error}`);
|
|
1307
|
+
done(error);
|
|
1308
|
+
}
|
|
1309
|
+
});
|
|
1310
|
+
});
|
|
1311
|
+
|
|
1312
|
+
describe('#getDevicesFiltered', () => {
|
|
1313
|
+
it('should have a getDevicesFiltered function', (done) => {
|
|
1314
|
+
try {
|
|
1315
|
+
assert.equal(true, typeof a.getDevicesFiltered === 'function');
|
|
1316
|
+
done();
|
|
1317
|
+
} catch (error) {
|
|
1318
|
+
log.error(`Test Failure: ${error}`);
|
|
1319
|
+
done(error);
|
|
1320
|
+
}
|
|
1321
|
+
});
|
|
1322
|
+
});
|
|
1323
|
+
|
|
1324
|
+
describe('#isAlive', () => {
|
|
1325
|
+
it('should have a isAlive function', (done) => {
|
|
1326
|
+
try {
|
|
1327
|
+
assert.equal(true, typeof a.isAlive === 'function');
|
|
1328
|
+
done();
|
|
1329
|
+
} catch (error) {
|
|
1330
|
+
log.error(`Test Failure: ${error}`);
|
|
1331
|
+
done(error);
|
|
1332
|
+
}
|
|
1333
|
+
});
|
|
1334
|
+
});
|
|
1335
|
+
|
|
1336
|
+
describe('#getConfig', () => {
|
|
1337
|
+
it('should have a getConfig function', (done) => {
|
|
1338
|
+
try {
|
|
1339
|
+
assert.equal(true, typeof a.getConfig === 'function');
|
|
1340
|
+
done();
|
|
1341
|
+
} catch (error) {
|
|
1342
|
+
log.error(`Test Failure: ${error}`);
|
|
1343
|
+
done(error);
|
|
1344
|
+
}
|
|
1345
|
+
});
|
|
1346
|
+
});
|
|
1347
|
+
|
|
1348
|
+
describe('#getCount', () => {
|
|
1349
|
+
it('should have a getCount function', (done) => {
|
|
1350
|
+
try {
|
|
1351
|
+
assert.equal(true, typeof a.getCount === 'function');
|
|
1352
|
+
done();
|
|
1353
|
+
} catch (error) {
|
|
1354
|
+
log.error(`Test Failure: ${error}`);
|
|
1355
|
+
done(error);
|
|
1356
|
+
}
|
|
1357
|
+
});
|
|
1358
|
+
});
|
|
1359
|
+
|
|
1360
|
+
/*
|
|
1361
|
+
-----------------------------------------------------------------------
|
|
1362
|
+
-----------------------------------------------------------------------
|
|
1363
|
+
*** All code above this comment will be replaced during a migration ***
|
|
1364
|
+
******************* DO NOT REMOVE THIS COMMENT BLOCK ******************
|
|
1365
|
+
-----------------------------------------------------------------------
|
|
1366
|
+
-----------------------------------------------------------------------
|
|
1367
|
+
*/
|
|
1368
|
+
|
|
1369
|
+
describe('#activateKeySigningKey - errors', () => {
|
|
1370
|
+
it('should have a activateKeySigningKey function', (done) => {
|
|
1371
|
+
try {
|
|
1372
|
+
assert.equal(true, typeof a.activateKeySigningKey === 'function');
|
|
1373
|
+
done();
|
|
1374
|
+
} catch (error) {
|
|
1375
|
+
log.error(`Test Failure: ${error}`);
|
|
1376
|
+
done(error);
|
|
1377
|
+
}
|
|
1378
|
+
}).timeout(attemptTimeout);
|
|
1379
|
+
it('should error if - missing hostedZoneId', (done) => {
|
|
1380
|
+
try {
|
|
1381
|
+
a.activateKeySigningKey(null, null, (data, error) => {
|
|
1382
|
+
try {
|
|
1383
|
+
const displayE = 'hostedZoneId is required';
|
|
1384
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-activateKeySigningKey', displayE);
|
|
1385
|
+
done();
|
|
1386
|
+
} catch (err) {
|
|
1387
|
+
log.error(`Test Failure: ${err}`);
|
|
1388
|
+
done(err);
|
|
1389
|
+
}
|
|
1390
|
+
});
|
|
1391
|
+
} catch (error) {
|
|
1392
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1393
|
+
done(error);
|
|
1394
|
+
}
|
|
1395
|
+
}).timeout(attemptTimeout);
|
|
1396
|
+
it('should error if - missing name', (done) => {
|
|
1397
|
+
try {
|
|
1398
|
+
a.activateKeySigningKey('fakeparam', null, (data, error) => {
|
|
1399
|
+
try {
|
|
1400
|
+
const displayE = 'name is required';
|
|
1401
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-activateKeySigningKey', displayE);
|
|
1402
|
+
done();
|
|
1403
|
+
} catch (err) {
|
|
1404
|
+
log.error(`Test Failure: ${err}`);
|
|
1405
|
+
done(err);
|
|
1406
|
+
}
|
|
1407
|
+
});
|
|
1408
|
+
} catch (error) {
|
|
1409
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1410
|
+
done(error);
|
|
1411
|
+
}
|
|
1412
|
+
}).timeout(attemptTimeout);
|
|
1413
|
+
});
|
|
1414
|
+
|
|
1415
|
+
describe('#associateVPCWithHostedZone - errors', () => {
|
|
1416
|
+
it('should have a associateVPCWithHostedZone function', (done) => {
|
|
1417
|
+
try {
|
|
1418
|
+
assert.equal(true, typeof a.associateVPCWithHostedZone === 'function');
|
|
1419
|
+
done();
|
|
1420
|
+
} catch (error) {
|
|
1421
|
+
log.error(`Test Failure: ${error}`);
|
|
1422
|
+
done(error);
|
|
1423
|
+
}
|
|
1424
|
+
}).timeout(attemptTimeout);
|
|
1425
|
+
it('should error if - missing id', (done) => {
|
|
1426
|
+
try {
|
|
1427
|
+
a.associateVPCWithHostedZone(null, null, (data, error) => {
|
|
1428
|
+
try {
|
|
1429
|
+
const displayE = 'id is required';
|
|
1430
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-associateVPCWithHostedZone', displayE);
|
|
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
|
+
}).timeout(attemptTimeout);
|
|
1442
|
+
it('should error if - missing body', (done) => {
|
|
1443
|
+
try {
|
|
1444
|
+
a.associateVPCWithHostedZone('fakeparam', null, (data, error) => {
|
|
1445
|
+
try {
|
|
1446
|
+
const displayE = 'body is required';
|
|
1447
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-associateVPCWithHostedZone', displayE);
|
|
1448
|
+
done();
|
|
1449
|
+
} catch (err) {
|
|
1450
|
+
log.error(`Test Failure: ${err}`);
|
|
1451
|
+
done(err);
|
|
1452
|
+
}
|
|
1453
|
+
});
|
|
1454
|
+
} catch (error) {
|
|
1455
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1456
|
+
done(error);
|
|
1457
|
+
}
|
|
1458
|
+
}).timeout(attemptTimeout);
|
|
1459
|
+
});
|
|
1460
|
+
|
|
1461
|
+
describe('#changeResourceRecordSets - errors', () => {
|
|
1462
|
+
it('should have a changeResourceRecordSets function', (done) => {
|
|
1463
|
+
try {
|
|
1464
|
+
assert.equal(true, typeof a.changeResourceRecordSets === 'function');
|
|
1465
|
+
done();
|
|
1466
|
+
} catch (error) {
|
|
1467
|
+
log.error(`Test Failure: ${error}`);
|
|
1468
|
+
done(error);
|
|
1469
|
+
}
|
|
1470
|
+
}).timeout(attemptTimeout);
|
|
1471
|
+
it('should error if - missing id', (done) => {
|
|
1472
|
+
try {
|
|
1473
|
+
a.changeResourceRecordSets(null, null, (data, error) => {
|
|
1474
|
+
try {
|
|
1475
|
+
const displayE = 'id is required';
|
|
1476
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-changeResourceRecordSets', displayE);
|
|
1477
|
+
done();
|
|
1478
|
+
} catch (err) {
|
|
1479
|
+
log.error(`Test Failure: ${err}`);
|
|
1480
|
+
done(err);
|
|
1481
|
+
}
|
|
1482
|
+
});
|
|
1483
|
+
} catch (error) {
|
|
1484
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1485
|
+
done(error);
|
|
1486
|
+
}
|
|
1487
|
+
}).timeout(attemptTimeout);
|
|
1488
|
+
it('should error if - missing body', (done) => {
|
|
1489
|
+
try {
|
|
1490
|
+
a.changeResourceRecordSets('fakeparam', null, (data, error) => {
|
|
1491
|
+
try {
|
|
1492
|
+
const displayE = 'body is required';
|
|
1493
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-changeResourceRecordSets', displayE);
|
|
1494
|
+
done();
|
|
1495
|
+
} catch (err) {
|
|
1496
|
+
log.error(`Test Failure: ${err}`);
|
|
1497
|
+
done(err);
|
|
1498
|
+
}
|
|
1499
|
+
});
|
|
1500
|
+
} catch (error) {
|
|
1501
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1502
|
+
done(error);
|
|
1503
|
+
}
|
|
1504
|
+
}).timeout(attemptTimeout);
|
|
1505
|
+
});
|
|
1506
|
+
|
|
1507
|
+
describe('#changeTagsForResource - errors', () => {
|
|
1508
|
+
it('should have a changeTagsForResource function', (done) => {
|
|
1509
|
+
try {
|
|
1510
|
+
assert.equal(true, typeof a.changeTagsForResource === 'function');
|
|
1511
|
+
done();
|
|
1512
|
+
} catch (error) {
|
|
1513
|
+
log.error(`Test Failure: ${error}`);
|
|
1514
|
+
done(error);
|
|
1515
|
+
}
|
|
1516
|
+
}).timeout(attemptTimeout);
|
|
1517
|
+
it('should error if - missing resourceType', (done) => {
|
|
1518
|
+
try {
|
|
1519
|
+
a.changeTagsForResource(null, null, null, (data, error) => {
|
|
1520
|
+
try {
|
|
1521
|
+
const displayE = 'resourceType is required';
|
|
1522
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-changeTagsForResource', displayE);
|
|
1523
|
+
done();
|
|
1524
|
+
} catch (err) {
|
|
1525
|
+
log.error(`Test Failure: ${err}`);
|
|
1526
|
+
done(err);
|
|
1527
|
+
}
|
|
1528
|
+
});
|
|
1529
|
+
} catch (error) {
|
|
1530
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1531
|
+
done(error);
|
|
1532
|
+
}
|
|
1533
|
+
}).timeout(attemptTimeout);
|
|
1534
|
+
it('should error if - missing resourceId', (done) => {
|
|
1535
|
+
try {
|
|
1536
|
+
a.changeTagsForResource('fakeparam', null, null, (data, error) => {
|
|
1537
|
+
try {
|
|
1538
|
+
const displayE = 'resourceId is required';
|
|
1539
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-changeTagsForResource', displayE);
|
|
1540
|
+
done();
|
|
1541
|
+
} catch (err) {
|
|
1542
|
+
log.error(`Test Failure: ${err}`);
|
|
1543
|
+
done(err);
|
|
1544
|
+
}
|
|
1545
|
+
});
|
|
1546
|
+
} catch (error) {
|
|
1547
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1548
|
+
done(error);
|
|
1549
|
+
}
|
|
1550
|
+
}).timeout(attemptTimeout);
|
|
1551
|
+
it('should error if - missing body', (done) => {
|
|
1552
|
+
try {
|
|
1553
|
+
a.changeTagsForResource('fakeparam', 'fakeparam', null, (data, error) => {
|
|
1554
|
+
try {
|
|
1555
|
+
const displayE = 'body is required';
|
|
1556
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-changeTagsForResource', displayE);
|
|
1557
|
+
done();
|
|
1558
|
+
} catch (err) {
|
|
1559
|
+
log.error(`Test Failure: ${err}`);
|
|
1560
|
+
done(err);
|
|
1561
|
+
}
|
|
1562
|
+
});
|
|
1563
|
+
} catch (error) {
|
|
1564
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1565
|
+
done(error);
|
|
1566
|
+
}
|
|
1567
|
+
}).timeout(attemptTimeout);
|
|
1568
|
+
});
|
|
1569
|
+
|
|
1570
|
+
describe('#listTagsForResource - errors', () => {
|
|
1571
|
+
it('should have a listTagsForResource function', (done) => {
|
|
1572
|
+
try {
|
|
1573
|
+
assert.equal(true, typeof a.listTagsForResource === 'function');
|
|
1574
|
+
done();
|
|
1575
|
+
} catch (error) {
|
|
1576
|
+
log.error(`Test Failure: ${error}`);
|
|
1577
|
+
done(error);
|
|
1578
|
+
}
|
|
1579
|
+
}).timeout(attemptTimeout);
|
|
1580
|
+
it('should error if - missing resourceType', (done) => {
|
|
1581
|
+
try {
|
|
1582
|
+
a.listTagsForResource(null, null, (data, error) => {
|
|
1583
|
+
try {
|
|
1584
|
+
const displayE = 'resourceType is required';
|
|
1585
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-listTagsForResource', displayE);
|
|
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
|
+
}).timeout(attemptTimeout);
|
|
1597
|
+
it('should error if - missing resourceId', (done) => {
|
|
1598
|
+
try {
|
|
1599
|
+
a.listTagsForResource('fakeparam', null, (data, error) => {
|
|
1600
|
+
try {
|
|
1601
|
+
const displayE = 'resourceId is required';
|
|
1602
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-listTagsForResource', displayE);
|
|
1603
|
+
done();
|
|
1604
|
+
} catch (err) {
|
|
1605
|
+
log.error(`Test Failure: ${err}`);
|
|
1606
|
+
done(err);
|
|
1607
|
+
}
|
|
1608
|
+
});
|
|
1609
|
+
} catch (error) {
|
|
1610
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1611
|
+
done(error);
|
|
1612
|
+
}
|
|
1613
|
+
}).timeout(attemptTimeout);
|
|
1614
|
+
});
|
|
1615
|
+
|
|
1616
|
+
describe('#createHealthCheck - errors', () => {
|
|
1617
|
+
it('should have a createHealthCheck function', (done) => {
|
|
1618
|
+
try {
|
|
1619
|
+
assert.equal(true, typeof a.createHealthCheck === 'function');
|
|
1620
|
+
done();
|
|
1621
|
+
} catch (error) {
|
|
1622
|
+
log.error(`Test Failure: ${error}`);
|
|
1623
|
+
done(error);
|
|
1624
|
+
}
|
|
1625
|
+
}).timeout(attemptTimeout);
|
|
1626
|
+
it('should error if - missing body', (done) => {
|
|
1627
|
+
try {
|
|
1628
|
+
a.createHealthCheck(null, (data, error) => {
|
|
1629
|
+
try {
|
|
1630
|
+
const displayE = 'body is required';
|
|
1631
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-createHealthCheck', displayE);
|
|
1632
|
+
done();
|
|
1633
|
+
} catch (err) {
|
|
1634
|
+
log.error(`Test Failure: ${err}`);
|
|
1635
|
+
done(err);
|
|
1636
|
+
}
|
|
1637
|
+
});
|
|
1638
|
+
} catch (error) {
|
|
1639
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1640
|
+
done(error);
|
|
1641
|
+
}
|
|
1642
|
+
}).timeout(attemptTimeout);
|
|
1643
|
+
});
|
|
1644
|
+
|
|
1645
|
+
describe('#listHealthChecks - errors', () => {
|
|
1646
|
+
it('should have a listHealthChecks function', (done) => {
|
|
1647
|
+
try {
|
|
1648
|
+
assert.equal(true, typeof a.listHealthChecks === 'function');
|
|
1649
|
+
done();
|
|
1650
|
+
} catch (error) {
|
|
1651
|
+
log.error(`Test Failure: ${error}`);
|
|
1652
|
+
done(error);
|
|
1653
|
+
}
|
|
1654
|
+
}).timeout(attemptTimeout);
|
|
1655
|
+
});
|
|
1656
|
+
|
|
1657
|
+
describe('#createHostedZone - errors', () => {
|
|
1658
|
+
it('should have a createHostedZone function', (done) => {
|
|
1659
|
+
try {
|
|
1660
|
+
assert.equal(true, typeof a.createHostedZone === 'function');
|
|
1661
|
+
done();
|
|
1662
|
+
} catch (error) {
|
|
1663
|
+
log.error(`Test Failure: ${error}`);
|
|
1664
|
+
done(error);
|
|
1665
|
+
}
|
|
1666
|
+
}).timeout(attemptTimeout);
|
|
1667
|
+
it('should error if - missing body', (done) => {
|
|
1668
|
+
try {
|
|
1669
|
+
a.createHostedZone(null, (data, error) => {
|
|
1670
|
+
try {
|
|
1671
|
+
const displayE = 'body is required';
|
|
1672
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-createHostedZone', displayE);
|
|
1673
|
+
done();
|
|
1674
|
+
} catch (err) {
|
|
1675
|
+
log.error(`Test Failure: ${err}`);
|
|
1676
|
+
done(err);
|
|
1677
|
+
}
|
|
1678
|
+
});
|
|
1679
|
+
} catch (error) {
|
|
1680
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1681
|
+
done(error);
|
|
1682
|
+
}
|
|
1683
|
+
}).timeout(attemptTimeout);
|
|
1684
|
+
});
|
|
1685
|
+
|
|
1686
|
+
describe('#listHostedZones - errors', () => {
|
|
1687
|
+
it('should have a listHostedZones function', (done) => {
|
|
1688
|
+
try {
|
|
1689
|
+
assert.equal(true, typeof a.listHostedZones === 'function');
|
|
1690
|
+
done();
|
|
1691
|
+
} catch (error) {
|
|
1692
|
+
log.error(`Test Failure: ${error}`);
|
|
1693
|
+
done(error);
|
|
1694
|
+
}
|
|
1695
|
+
}).timeout(attemptTimeout);
|
|
1696
|
+
});
|
|
1697
|
+
|
|
1698
|
+
describe('#createKeySigningKey - errors', () => {
|
|
1699
|
+
it('should have a createKeySigningKey function', (done) => {
|
|
1700
|
+
try {
|
|
1701
|
+
assert.equal(true, typeof a.createKeySigningKey === '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 body', (done) => {
|
|
1709
|
+
try {
|
|
1710
|
+
a.createKeySigningKey(null, (data, error) => {
|
|
1711
|
+
try {
|
|
1712
|
+
const displayE = 'body is required';
|
|
1713
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-createKeySigningKey', 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('#createQueryLoggingConfig - errors', () => {
|
|
1728
|
+
it('should have a createQueryLoggingConfig function', (done) => {
|
|
1729
|
+
try {
|
|
1730
|
+
assert.equal(true, typeof a.createQueryLoggingConfig === '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 body', (done) => {
|
|
1738
|
+
try {
|
|
1739
|
+
a.createQueryLoggingConfig(null, (data, error) => {
|
|
1740
|
+
try {
|
|
1741
|
+
const displayE = 'body is required';
|
|
1742
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-createQueryLoggingConfig', 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
|
+
});
|
|
1755
|
+
|
|
1756
|
+
describe('#listQueryLoggingConfigs - errors', () => {
|
|
1757
|
+
it('should have a listQueryLoggingConfigs function', (done) => {
|
|
1758
|
+
try {
|
|
1759
|
+
assert.equal(true, typeof a.listQueryLoggingConfigs === 'function');
|
|
1760
|
+
done();
|
|
1761
|
+
} catch (error) {
|
|
1762
|
+
log.error(`Test Failure: ${error}`);
|
|
1763
|
+
done(error);
|
|
1764
|
+
}
|
|
1765
|
+
}).timeout(attemptTimeout);
|
|
1766
|
+
});
|
|
1767
|
+
|
|
1768
|
+
describe('#createReusableDelegationSet - errors', () => {
|
|
1769
|
+
it('should have a createReusableDelegationSet function', (done) => {
|
|
1770
|
+
try {
|
|
1771
|
+
assert.equal(true, typeof a.createReusableDelegationSet === 'function');
|
|
1772
|
+
done();
|
|
1773
|
+
} catch (error) {
|
|
1774
|
+
log.error(`Test Failure: ${error}`);
|
|
1775
|
+
done(error);
|
|
1776
|
+
}
|
|
1777
|
+
}).timeout(attemptTimeout);
|
|
1778
|
+
it('should error if - missing body', (done) => {
|
|
1779
|
+
try {
|
|
1780
|
+
a.createReusableDelegationSet(null, (data, error) => {
|
|
1781
|
+
try {
|
|
1782
|
+
const displayE = 'body is required';
|
|
1783
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-createReusableDelegationSet', displayE);
|
|
1784
|
+
done();
|
|
1785
|
+
} catch (err) {
|
|
1786
|
+
log.error(`Test Failure: ${err}`);
|
|
1787
|
+
done(err);
|
|
1788
|
+
}
|
|
1789
|
+
});
|
|
1790
|
+
} catch (error) {
|
|
1791
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1792
|
+
done(error);
|
|
1793
|
+
}
|
|
1794
|
+
}).timeout(attemptTimeout);
|
|
1795
|
+
});
|
|
1796
|
+
|
|
1797
|
+
describe('#listReusableDelegationSets - errors', () => {
|
|
1798
|
+
it('should have a listReusableDelegationSets function', (done) => {
|
|
1799
|
+
try {
|
|
1800
|
+
assert.equal(true, typeof a.listReusableDelegationSets === 'function');
|
|
1801
|
+
done();
|
|
1802
|
+
} catch (error) {
|
|
1803
|
+
log.error(`Test Failure: ${error}`);
|
|
1804
|
+
done(error);
|
|
1805
|
+
}
|
|
1806
|
+
}).timeout(attemptTimeout);
|
|
1807
|
+
});
|
|
1808
|
+
|
|
1809
|
+
describe('#createTrafficPolicy - errors', () => {
|
|
1810
|
+
it('should have a createTrafficPolicy function', (done) => {
|
|
1811
|
+
try {
|
|
1812
|
+
assert.equal(true, typeof a.createTrafficPolicy === 'function');
|
|
1813
|
+
done();
|
|
1814
|
+
} catch (error) {
|
|
1815
|
+
log.error(`Test Failure: ${error}`);
|
|
1816
|
+
done(error);
|
|
1817
|
+
}
|
|
1818
|
+
}).timeout(attemptTimeout);
|
|
1819
|
+
it('should error if - missing body', (done) => {
|
|
1820
|
+
try {
|
|
1821
|
+
a.createTrafficPolicy(null, (data, error) => {
|
|
1822
|
+
try {
|
|
1823
|
+
const displayE = 'body is required';
|
|
1824
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-createTrafficPolicy', displayE);
|
|
1825
|
+
done();
|
|
1826
|
+
} catch (err) {
|
|
1827
|
+
log.error(`Test Failure: ${err}`);
|
|
1828
|
+
done(err);
|
|
1829
|
+
}
|
|
1830
|
+
});
|
|
1831
|
+
} catch (error) {
|
|
1832
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1833
|
+
done(error);
|
|
1834
|
+
}
|
|
1835
|
+
}).timeout(attemptTimeout);
|
|
1836
|
+
});
|
|
1837
|
+
|
|
1838
|
+
describe('#createTrafficPolicyInstance - errors', () => {
|
|
1839
|
+
it('should have a createTrafficPolicyInstance function', (done) => {
|
|
1840
|
+
try {
|
|
1841
|
+
assert.equal(true, typeof a.createTrafficPolicyInstance === 'function');
|
|
1842
|
+
done();
|
|
1843
|
+
} catch (error) {
|
|
1844
|
+
log.error(`Test Failure: ${error}`);
|
|
1845
|
+
done(error);
|
|
1846
|
+
}
|
|
1847
|
+
}).timeout(attemptTimeout);
|
|
1848
|
+
it('should error if - missing body', (done) => {
|
|
1849
|
+
try {
|
|
1850
|
+
a.createTrafficPolicyInstance(null, (data, error) => {
|
|
1851
|
+
try {
|
|
1852
|
+
const displayE = 'body is required';
|
|
1853
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-createTrafficPolicyInstance', displayE);
|
|
1854
|
+
done();
|
|
1855
|
+
} catch (err) {
|
|
1856
|
+
log.error(`Test Failure: ${err}`);
|
|
1857
|
+
done(err);
|
|
1858
|
+
}
|
|
1859
|
+
});
|
|
1860
|
+
} catch (error) {
|
|
1861
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1862
|
+
done(error);
|
|
1863
|
+
}
|
|
1864
|
+
}).timeout(attemptTimeout);
|
|
1865
|
+
});
|
|
1866
|
+
|
|
1867
|
+
describe('#createTrafficPolicyVersion - errors', () => {
|
|
1868
|
+
it('should have a createTrafficPolicyVersion function', (done) => {
|
|
1869
|
+
try {
|
|
1870
|
+
assert.equal(true, typeof a.createTrafficPolicyVersion === 'function');
|
|
1871
|
+
done();
|
|
1872
|
+
} catch (error) {
|
|
1873
|
+
log.error(`Test Failure: ${error}`);
|
|
1874
|
+
done(error);
|
|
1875
|
+
}
|
|
1876
|
+
}).timeout(attemptTimeout);
|
|
1877
|
+
it('should error if - missing id', (done) => {
|
|
1878
|
+
try {
|
|
1879
|
+
a.createTrafficPolicyVersion(null, null, (data, error) => {
|
|
1880
|
+
try {
|
|
1881
|
+
const displayE = 'id is required';
|
|
1882
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-createTrafficPolicyVersion', displayE);
|
|
1883
|
+
done();
|
|
1884
|
+
} catch (err) {
|
|
1885
|
+
log.error(`Test Failure: ${err}`);
|
|
1886
|
+
done(err);
|
|
1887
|
+
}
|
|
1888
|
+
});
|
|
1889
|
+
} catch (error) {
|
|
1890
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1891
|
+
done(error);
|
|
1892
|
+
}
|
|
1893
|
+
}).timeout(attemptTimeout);
|
|
1894
|
+
it('should error if - missing body', (done) => {
|
|
1895
|
+
try {
|
|
1896
|
+
a.createTrafficPolicyVersion('fakeparam', null, (data, error) => {
|
|
1897
|
+
try {
|
|
1898
|
+
const displayE = 'body is required';
|
|
1899
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-createTrafficPolicyVersion', displayE);
|
|
1900
|
+
done();
|
|
1901
|
+
} catch (err) {
|
|
1902
|
+
log.error(`Test Failure: ${err}`);
|
|
1903
|
+
done(err);
|
|
1904
|
+
}
|
|
1905
|
+
});
|
|
1906
|
+
} catch (error) {
|
|
1907
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1908
|
+
done(error);
|
|
1909
|
+
}
|
|
1910
|
+
}).timeout(attemptTimeout);
|
|
1911
|
+
});
|
|
1912
|
+
|
|
1913
|
+
describe('#createVPCAssociationAuthorization - errors', () => {
|
|
1914
|
+
it('should have a createVPCAssociationAuthorization function', (done) => {
|
|
1915
|
+
try {
|
|
1916
|
+
assert.equal(true, typeof a.createVPCAssociationAuthorization === 'function');
|
|
1917
|
+
done();
|
|
1918
|
+
} catch (error) {
|
|
1919
|
+
log.error(`Test Failure: ${error}`);
|
|
1920
|
+
done(error);
|
|
1921
|
+
}
|
|
1922
|
+
}).timeout(attemptTimeout);
|
|
1923
|
+
it('should error if - missing id', (done) => {
|
|
1924
|
+
try {
|
|
1925
|
+
a.createVPCAssociationAuthorization(null, null, (data, error) => {
|
|
1926
|
+
try {
|
|
1927
|
+
const displayE = 'id is required';
|
|
1928
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-createVPCAssociationAuthorization', displayE);
|
|
1929
|
+
done();
|
|
1930
|
+
} catch (err) {
|
|
1931
|
+
log.error(`Test Failure: ${err}`);
|
|
1932
|
+
done(err);
|
|
1933
|
+
}
|
|
1934
|
+
});
|
|
1935
|
+
} catch (error) {
|
|
1936
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1937
|
+
done(error);
|
|
1938
|
+
}
|
|
1939
|
+
}).timeout(attemptTimeout);
|
|
1940
|
+
it('should error if - missing body', (done) => {
|
|
1941
|
+
try {
|
|
1942
|
+
a.createVPCAssociationAuthorization('fakeparam', null, (data, error) => {
|
|
1943
|
+
try {
|
|
1944
|
+
const displayE = 'body is required';
|
|
1945
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-createVPCAssociationAuthorization', displayE);
|
|
1946
|
+
done();
|
|
1947
|
+
} catch (err) {
|
|
1948
|
+
log.error(`Test Failure: ${err}`);
|
|
1949
|
+
done(err);
|
|
1950
|
+
}
|
|
1951
|
+
});
|
|
1952
|
+
} catch (error) {
|
|
1953
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1954
|
+
done(error);
|
|
1955
|
+
}
|
|
1956
|
+
}).timeout(attemptTimeout);
|
|
1957
|
+
});
|
|
1958
|
+
|
|
1959
|
+
describe('#listVPCAssociationAuthorizations - errors', () => {
|
|
1960
|
+
it('should have a listVPCAssociationAuthorizations function', (done) => {
|
|
1961
|
+
try {
|
|
1962
|
+
assert.equal(true, typeof a.listVPCAssociationAuthorizations === 'function');
|
|
1963
|
+
done();
|
|
1964
|
+
} catch (error) {
|
|
1965
|
+
log.error(`Test Failure: ${error}`);
|
|
1966
|
+
done(error);
|
|
1967
|
+
}
|
|
1968
|
+
}).timeout(attemptTimeout);
|
|
1969
|
+
it('should error if - missing id', (done) => {
|
|
1970
|
+
try {
|
|
1971
|
+
a.listVPCAssociationAuthorizations(null, null, null, (data, error) => {
|
|
1972
|
+
try {
|
|
1973
|
+
const displayE = 'id is required';
|
|
1974
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-listVPCAssociationAuthorizations', displayE);
|
|
1975
|
+
done();
|
|
1976
|
+
} catch (err) {
|
|
1977
|
+
log.error(`Test Failure: ${err}`);
|
|
1978
|
+
done(err);
|
|
1979
|
+
}
|
|
1980
|
+
});
|
|
1981
|
+
} catch (error) {
|
|
1982
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1983
|
+
done(error);
|
|
1984
|
+
}
|
|
1985
|
+
}).timeout(attemptTimeout);
|
|
1986
|
+
});
|
|
1987
|
+
|
|
1988
|
+
describe('#deactivateKeySigningKey - errors', () => {
|
|
1989
|
+
it('should have a deactivateKeySigningKey function', (done) => {
|
|
1990
|
+
try {
|
|
1991
|
+
assert.equal(true, typeof a.deactivateKeySigningKey === 'function');
|
|
1992
|
+
done();
|
|
1993
|
+
} catch (error) {
|
|
1994
|
+
log.error(`Test Failure: ${error}`);
|
|
1995
|
+
done(error);
|
|
1996
|
+
}
|
|
1997
|
+
}).timeout(attemptTimeout);
|
|
1998
|
+
it('should error if - missing hostedZoneId', (done) => {
|
|
1999
|
+
try {
|
|
2000
|
+
a.deactivateKeySigningKey(null, null, (data, error) => {
|
|
2001
|
+
try {
|
|
2002
|
+
const displayE = 'hostedZoneId is required';
|
|
2003
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-deactivateKeySigningKey', displayE);
|
|
2004
|
+
done();
|
|
2005
|
+
} catch (err) {
|
|
2006
|
+
log.error(`Test Failure: ${err}`);
|
|
2007
|
+
done(err);
|
|
2008
|
+
}
|
|
2009
|
+
});
|
|
2010
|
+
} catch (error) {
|
|
2011
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2012
|
+
done(error);
|
|
2013
|
+
}
|
|
2014
|
+
}).timeout(attemptTimeout);
|
|
2015
|
+
it('should error if - missing name', (done) => {
|
|
2016
|
+
try {
|
|
2017
|
+
a.deactivateKeySigningKey('fakeparam', null, (data, error) => {
|
|
2018
|
+
try {
|
|
2019
|
+
const displayE = 'name is required';
|
|
2020
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-deactivateKeySigningKey', displayE);
|
|
2021
|
+
done();
|
|
2022
|
+
} catch (err) {
|
|
2023
|
+
log.error(`Test Failure: ${err}`);
|
|
2024
|
+
done(err);
|
|
2025
|
+
}
|
|
2026
|
+
});
|
|
2027
|
+
} catch (error) {
|
|
2028
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2029
|
+
done(error);
|
|
2030
|
+
}
|
|
2031
|
+
}).timeout(attemptTimeout);
|
|
2032
|
+
});
|
|
2033
|
+
|
|
2034
|
+
describe('#deleteHealthCheck - errors', () => {
|
|
2035
|
+
it('should have a deleteHealthCheck function', (done) => {
|
|
2036
|
+
try {
|
|
2037
|
+
assert.equal(true, typeof a.deleteHealthCheck === 'function');
|
|
2038
|
+
done();
|
|
2039
|
+
} catch (error) {
|
|
2040
|
+
log.error(`Test Failure: ${error}`);
|
|
2041
|
+
done(error);
|
|
2042
|
+
}
|
|
2043
|
+
}).timeout(attemptTimeout);
|
|
2044
|
+
it('should error if - missing healthCheckId', (done) => {
|
|
2045
|
+
try {
|
|
2046
|
+
a.deleteHealthCheck(null, (data, error) => {
|
|
2047
|
+
try {
|
|
2048
|
+
const displayE = 'healthCheckId is required';
|
|
2049
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-deleteHealthCheck', displayE);
|
|
2050
|
+
done();
|
|
2051
|
+
} catch (err) {
|
|
2052
|
+
log.error(`Test Failure: ${err}`);
|
|
2053
|
+
done(err);
|
|
2054
|
+
}
|
|
2055
|
+
});
|
|
2056
|
+
} catch (error) {
|
|
2057
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2058
|
+
done(error);
|
|
2059
|
+
}
|
|
2060
|
+
}).timeout(attemptTimeout);
|
|
2061
|
+
});
|
|
2062
|
+
|
|
2063
|
+
describe('#getHealthCheck - errors', () => {
|
|
2064
|
+
it('should have a getHealthCheck function', (done) => {
|
|
2065
|
+
try {
|
|
2066
|
+
assert.equal(true, typeof a.getHealthCheck === 'function');
|
|
2067
|
+
done();
|
|
2068
|
+
} catch (error) {
|
|
2069
|
+
log.error(`Test Failure: ${error}`);
|
|
2070
|
+
done(error);
|
|
2071
|
+
}
|
|
2072
|
+
}).timeout(attemptTimeout);
|
|
2073
|
+
it('should error if - missing healthCheckId', (done) => {
|
|
2074
|
+
try {
|
|
2075
|
+
a.getHealthCheck(null, (data, error) => {
|
|
2076
|
+
try {
|
|
2077
|
+
const displayE = 'healthCheckId is required';
|
|
2078
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-getHealthCheck', displayE);
|
|
2079
|
+
done();
|
|
2080
|
+
} catch (err) {
|
|
2081
|
+
log.error(`Test Failure: ${err}`);
|
|
2082
|
+
done(err);
|
|
2083
|
+
}
|
|
2084
|
+
});
|
|
2085
|
+
} catch (error) {
|
|
2086
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2087
|
+
done(error);
|
|
2088
|
+
}
|
|
2089
|
+
}).timeout(attemptTimeout);
|
|
2090
|
+
});
|
|
2091
|
+
|
|
2092
|
+
describe('#updateHealthCheck - errors', () => {
|
|
2093
|
+
it('should have a updateHealthCheck function', (done) => {
|
|
2094
|
+
try {
|
|
2095
|
+
assert.equal(true, typeof a.updateHealthCheck === 'function');
|
|
2096
|
+
done();
|
|
2097
|
+
} catch (error) {
|
|
2098
|
+
log.error(`Test Failure: ${error}`);
|
|
2099
|
+
done(error);
|
|
2100
|
+
}
|
|
2101
|
+
}).timeout(attemptTimeout);
|
|
2102
|
+
it('should error if - missing healthCheckId', (done) => {
|
|
2103
|
+
try {
|
|
2104
|
+
a.updateHealthCheck(null, null, (data, error) => {
|
|
2105
|
+
try {
|
|
2106
|
+
const displayE = 'healthCheckId is required';
|
|
2107
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-updateHealthCheck', displayE);
|
|
2108
|
+
done();
|
|
2109
|
+
} catch (err) {
|
|
2110
|
+
log.error(`Test Failure: ${err}`);
|
|
2111
|
+
done(err);
|
|
2112
|
+
}
|
|
2113
|
+
});
|
|
2114
|
+
} catch (error) {
|
|
2115
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2116
|
+
done(error);
|
|
2117
|
+
}
|
|
2118
|
+
}).timeout(attemptTimeout);
|
|
2119
|
+
it('should error if - missing body', (done) => {
|
|
2120
|
+
try {
|
|
2121
|
+
a.updateHealthCheck('fakeparam', null, (data, error) => {
|
|
2122
|
+
try {
|
|
2123
|
+
const displayE = 'body is required';
|
|
2124
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-updateHealthCheck', displayE);
|
|
2125
|
+
done();
|
|
2126
|
+
} catch (err) {
|
|
2127
|
+
log.error(`Test Failure: ${err}`);
|
|
2128
|
+
done(err);
|
|
2129
|
+
}
|
|
2130
|
+
});
|
|
2131
|
+
} catch (error) {
|
|
2132
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2133
|
+
done(error);
|
|
2134
|
+
}
|
|
2135
|
+
}).timeout(attemptTimeout);
|
|
2136
|
+
});
|
|
2137
|
+
|
|
2138
|
+
describe('#deleteHostedZone - errors', () => {
|
|
2139
|
+
it('should have a deleteHostedZone function', (done) => {
|
|
2140
|
+
try {
|
|
2141
|
+
assert.equal(true, typeof a.deleteHostedZone === 'function');
|
|
2142
|
+
done();
|
|
2143
|
+
} catch (error) {
|
|
2144
|
+
log.error(`Test Failure: ${error}`);
|
|
2145
|
+
done(error);
|
|
2146
|
+
}
|
|
2147
|
+
}).timeout(attemptTimeout);
|
|
2148
|
+
it('should error if - missing id', (done) => {
|
|
2149
|
+
try {
|
|
2150
|
+
a.deleteHostedZone(null, (data, error) => {
|
|
2151
|
+
try {
|
|
2152
|
+
const displayE = 'id is required';
|
|
2153
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-deleteHostedZone', displayE);
|
|
2154
|
+
done();
|
|
2155
|
+
} catch (err) {
|
|
2156
|
+
log.error(`Test Failure: ${err}`);
|
|
2157
|
+
done(err);
|
|
2158
|
+
}
|
|
2159
|
+
});
|
|
2160
|
+
} catch (error) {
|
|
2161
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2162
|
+
done(error);
|
|
2163
|
+
}
|
|
2164
|
+
}).timeout(attemptTimeout);
|
|
2165
|
+
});
|
|
2166
|
+
|
|
2167
|
+
describe('#getHostedZone - errors', () => {
|
|
2168
|
+
it('should have a getHostedZone function', (done) => {
|
|
2169
|
+
try {
|
|
2170
|
+
assert.equal(true, typeof a.getHostedZone === 'function');
|
|
2171
|
+
done();
|
|
2172
|
+
} catch (error) {
|
|
2173
|
+
log.error(`Test Failure: ${error}`);
|
|
2174
|
+
done(error);
|
|
2175
|
+
}
|
|
2176
|
+
}).timeout(attemptTimeout);
|
|
2177
|
+
it('should error if - missing id', (done) => {
|
|
2178
|
+
try {
|
|
2179
|
+
a.getHostedZone(null, (data, error) => {
|
|
2180
|
+
try {
|
|
2181
|
+
const displayE = 'id is required';
|
|
2182
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-getHostedZone', displayE);
|
|
2183
|
+
done();
|
|
2184
|
+
} catch (err) {
|
|
2185
|
+
log.error(`Test Failure: ${err}`);
|
|
2186
|
+
done(err);
|
|
2187
|
+
}
|
|
2188
|
+
});
|
|
2189
|
+
} catch (error) {
|
|
2190
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2191
|
+
done(error);
|
|
2192
|
+
}
|
|
2193
|
+
}).timeout(attemptTimeout);
|
|
2194
|
+
});
|
|
2195
|
+
|
|
2196
|
+
describe('#updateHostedZoneComment - errors', () => {
|
|
2197
|
+
it('should have a updateHostedZoneComment function', (done) => {
|
|
2198
|
+
try {
|
|
2199
|
+
assert.equal(true, typeof a.updateHostedZoneComment === 'function');
|
|
2200
|
+
done();
|
|
2201
|
+
} catch (error) {
|
|
2202
|
+
log.error(`Test Failure: ${error}`);
|
|
2203
|
+
done(error);
|
|
2204
|
+
}
|
|
2205
|
+
}).timeout(attemptTimeout);
|
|
2206
|
+
it('should error if - missing id', (done) => {
|
|
2207
|
+
try {
|
|
2208
|
+
a.updateHostedZoneComment(null, null, (data, error) => {
|
|
2209
|
+
try {
|
|
2210
|
+
const displayE = 'id is required';
|
|
2211
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-updateHostedZoneComment', displayE);
|
|
2212
|
+
done();
|
|
2213
|
+
} catch (err) {
|
|
2214
|
+
log.error(`Test Failure: ${err}`);
|
|
2215
|
+
done(err);
|
|
2216
|
+
}
|
|
2217
|
+
});
|
|
2218
|
+
} catch (error) {
|
|
2219
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2220
|
+
done(error);
|
|
2221
|
+
}
|
|
2222
|
+
}).timeout(attemptTimeout);
|
|
2223
|
+
it('should error if - missing body', (done) => {
|
|
2224
|
+
try {
|
|
2225
|
+
a.updateHostedZoneComment('fakeparam', null, (data, error) => {
|
|
2226
|
+
try {
|
|
2227
|
+
const displayE = 'body is required';
|
|
2228
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-updateHostedZoneComment', displayE);
|
|
2229
|
+
done();
|
|
2230
|
+
} catch (err) {
|
|
2231
|
+
log.error(`Test Failure: ${err}`);
|
|
2232
|
+
done(err);
|
|
2233
|
+
}
|
|
2234
|
+
});
|
|
2235
|
+
} catch (error) {
|
|
2236
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2237
|
+
done(error);
|
|
2238
|
+
}
|
|
2239
|
+
}).timeout(attemptTimeout);
|
|
2240
|
+
});
|
|
2241
|
+
|
|
2242
|
+
describe('#deleteKeySigningKey - errors', () => {
|
|
2243
|
+
it('should have a deleteKeySigningKey function', (done) => {
|
|
2244
|
+
try {
|
|
2245
|
+
assert.equal(true, typeof a.deleteKeySigningKey === 'function');
|
|
2246
|
+
done();
|
|
2247
|
+
} catch (error) {
|
|
2248
|
+
log.error(`Test Failure: ${error}`);
|
|
2249
|
+
done(error);
|
|
2250
|
+
}
|
|
2251
|
+
}).timeout(attemptTimeout);
|
|
2252
|
+
it('should error if - missing hostedZoneId', (done) => {
|
|
2253
|
+
try {
|
|
2254
|
+
a.deleteKeySigningKey(null, null, (data, error) => {
|
|
2255
|
+
try {
|
|
2256
|
+
const displayE = 'hostedZoneId is required';
|
|
2257
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-deleteKeySigningKey', displayE);
|
|
2258
|
+
done();
|
|
2259
|
+
} catch (err) {
|
|
2260
|
+
log.error(`Test Failure: ${err}`);
|
|
2261
|
+
done(err);
|
|
2262
|
+
}
|
|
2263
|
+
});
|
|
2264
|
+
} catch (error) {
|
|
2265
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2266
|
+
done(error);
|
|
2267
|
+
}
|
|
2268
|
+
}).timeout(attemptTimeout);
|
|
2269
|
+
it('should error if - missing name', (done) => {
|
|
2270
|
+
try {
|
|
2271
|
+
a.deleteKeySigningKey('fakeparam', null, (data, error) => {
|
|
2272
|
+
try {
|
|
2273
|
+
const displayE = 'name is required';
|
|
2274
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-deleteKeySigningKey', displayE);
|
|
2275
|
+
done();
|
|
2276
|
+
} catch (err) {
|
|
2277
|
+
log.error(`Test Failure: ${err}`);
|
|
2278
|
+
done(err);
|
|
2279
|
+
}
|
|
2280
|
+
});
|
|
2281
|
+
} catch (error) {
|
|
2282
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2283
|
+
done(error);
|
|
2284
|
+
}
|
|
2285
|
+
}).timeout(attemptTimeout);
|
|
2286
|
+
});
|
|
2287
|
+
|
|
2288
|
+
describe('#deleteQueryLoggingConfig - errors', () => {
|
|
2289
|
+
it('should have a deleteQueryLoggingConfig function', (done) => {
|
|
2290
|
+
try {
|
|
2291
|
+
assert.equal(true, typeof a.deleteQueryLoggingConfig === 'function');
|
|
2292
|
+
done();
|
|
2293
|
+
} catch (error) {
|
|
2294
|
+
log.error(`Test Failure: ${error}`);
|
|
2295
|
+
done(error);
|
|
2296
|
+
}
|
|
2297
|
+
}).timeout(attemptTimeout);
|
|
2298
|
+
it('should error if - missing id', (done) => {
|
|
2299
|
+
try {
|
|
2300
|
+
a.deleteQueryLoggingConfig(null, (data, error) => {
|
|
2301
|
+
try {
|
|
2302
|
+
const displayE = 'id is required';
|
|
2303
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-deleteQueryLoggingConfig', displayE);
|
|
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
|
+
}).timeout(attemptTimeout);
|
|
2315
|
+
});
|
|
2316
|
+
|
|
2317
|
+
describe('#getQueryLoggingConfig - errors', () => {
|
|
2318
|
+
it('should have a getQueryLoggingConfig function', (done) => {
|
|
2319
|
+
try {
|
|
2320
|
+
assert.equal(true, typeof a.getQueryLoggingConfig === 'function');
|
|
2321
|
+
done();
|
|
2322
|
+
} catch (error) {
|
|
2323
|
+
log.error(`Test Failure: ${error}`);
|
|
2324
|
+
done(error);
|
|
2325
|
+
}
|
|
2326
|
+
}).timeout(attemptTimeout);
|
|
2327
|
+
it('should error if - missing id', (done) => {
|
|
2328
|
+
try {
|
|
2329
|
+
a.getQueryLoggingConfig(null, (data, error) => {
|
|
2330
|
+
try {
|
|
2331
|
+
const displayE = 'id is required';
|
|
2332
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-getQueryLoggingConfig', displayE);
|
|
2333
|
+
done();
|
|
2334
|
+
} catch (err) {
|
|
2335
|
+
log.error(`Test Failure: ${err}`);
|
|
2336
|
+
done(err);
|
|
2337
|
+
}
|
|
2338
|
+
});
|
|
2339
|
+
} catch (error) {
|
|
2340
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2341
|
+
done(error);
|
|
2342
|
+
}
|
|
2343
|
+
}).timeout(attemptTimeout);
|
|
2344
|
+
});
|
|
2345
|
+
|
|
2346
|
+
describe('#deleteReusableDelegationSet - errors', () => {
|
|
2347
|
+
it('should have a deleteReusableDelegationSet function', (done) => {
|
|
2348
|
+
try {
|
|
2349
|
+
assert.equal(true, typeof a.deleteReusableDelegationSet === 'function');
|
|
2350
|
+
done();
|
|
2351
|
+
} catch (error) {
|
|
2352
|
+
log.error(`Test Failure: ${error}`);
|
|
2353
|
+
done(error);
|
|
2354
|
+
}
|
|
2355
|
+
}).timeout(attemptTimeout);
|
|
2356
|
+
it('should error if - missing id', (done) => {
|
|
2357
|
+
try {
|
|
2358
|
+
a.deleteReusableDelegationSet(null, (data, error) => {
|
|
2359
|
+
try {
|
|
2360
|
+
const displayE = 'id is required';
|
|
2361
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-deleteReusableDelegationSet', displayE);
|
|
2362
|
+
done();
|
|
2363
|
+
} catch (err) {
|
|
2364
|
+
log.error(`Test Failure: ${err}`);
|
|
2365
|
+
done(err);
|
|
2366
|
+
}
|
|
2367
|
+
});
|
|
2368
|
+
} catch (error) {
|
|
2369
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2370
|
+
done(error);
|
|
2371
|
+
}
|
|
2372
|
+
}).timeout(attemptTimeout);
|
|
2373
|
+
});
|
|
2374
|
+
|
|
2375
|
+
describe('#getReusableDelegationSet - errors', () => {
|
|
2376
|
+
it('should have a getReusableDelegationSet function', (done) => {
|
|
2377
|
+
try {
|
|
2378
|
+
assert.equal(true, typeof a.getReusableDelegationSet === 'function');
|
|
2379
|
+
done();
|
|
2380
|
+
} catch (error) {
|
|
2381
|
+
log.error(`Test Failure: ${error}`);
|
|
2382
|
+
done(error);
|
|
2383
|
+
}
|
|
2384
|
+
}).timeout(attemptTimeout);
|
|
2385
|
+
it('should error if - missing id', (done) => {
|
|
2386
|
+
try {
|
|
2387
|
+
a.getReusableDelegationSet(null, (data, error) => {
|
|
2388
|
+
try {
|
|
2389
|
+
const displayE = 'id is required';
|
|
2390
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-getReusableDelegationSet', displayE);
|
|
2391
|
+
done();
|
|
2392
|
+
} catch (err) {
|
|
2393
|
+
log.error(`Test Failure: ${err}`);
|
|
2394
|
+
done(err);
|
|
2395
|
+
}
|
|
2396
|
+
});
|
|
2397
|
+
} catch (error) {
|
|
2398
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2399
|
+
done(error);
|
|
2400
|
+
}
|
|
2401
|
+
}).timeout(attemptTimeout);
|
|
2402
|
+
});
|
|
2403
|
+
|
|
2404
|
+
describe('#deleteTrafficPolicy - errors', () => {
|
|
2405
|
+
it('should have a deleteTrafficPolicy function', (done) => {
|
|
2406
|
+
try {
|
|
2407
|
+
assert.equal(true, typeof a.deleteTrafficPolicy === 'function');
|
|
2408
|
+
done();
|
|
2409
|
+
} catch (error) {
|
|
2410
|
+
log.error(`Test Failure: ${error}`);
|
|
2411
|
+
done(error);
|
|
2412
|
+
}
|
|
2413
|
+
}).timeout(attemptTimeout);
|
|
2414
|
+
it('should error if - missing id', (done) => {
|
|
2415
|
+
try {
|
|
2416
|
+
a.deleteTrafficPolicy(null, null, (data, error) => {
|
|
2417
|
+
try {
|
|
2418
|
+
const displayE = 'id is required';
|
|
2419
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-deleteTrafficPolicy', displayE);
|
|
2420
|
+
done();
|
|
2421
|
+
} catch (err) {
|
|
2422
|
+
log.error(`Test Failure: ${err}`);
|
|
2423
|
+
done(err);
|
|
2424
|
+
}
|
|
2425
|
+
});
|
|
2426
|
+
} catch (error) {
|
|
2427
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2428
|
+
done(error);
|
|
2429
|
+
}
|
|
2430
|
+
}).timeout(attemptTimeout);
|
|
2431
|
+
it('should error if - missing version', (done) => {
|
|
2432
|
+
try {
|
|
2433
|
+
a.deleteTrafficPolicy('fakeparam', null, (data, error) => {
|
|
2434
|
+
try {
|
|
2435
|
+
const displayE = 'version is required';
|
|
2436
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-deleteTrafficPolicy', displayE);
|
|
2437
|
+
done();
|
|
2438
|
+
} catch (err) {
|
|
2439
|
+
log.error(`Test Failure: ${err}`);
|
|
2440
|
+
done(err);
|
|
2441
|
+
}
|
|
2442
|
+
});
|
|
2443
|
+
} catch (error) {
|
|
2444
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2445
|
+
done(error);
|
|
2446
|
+
}
|
|
2447
|
+
}).timeout(attemptTimeout);
|
|
2448
|
+
});
|
|
2449
|
+
|
|
2450
|
+
describe('#getTrafficPolicy - errors', () => {
|
|
2451
|
+
it('should have a getTrafficPolicy function', (done) => {
|
|
2452
|
+
try {
|
|
2453
|
+
assert.equal(true, typeof a.getTrafficPolicy === 'function');
|
|
2454
|
+
done();
|
|
2455
|
+
} catch (error) {
|
|
2456
|
+
log.error(`Test Failure: ${error}`);
|
|
2457
|
+
done(error);
|
|
2458
|
+
}
|
|
2459
|
+
}).timeout(attemptTimeout);
|
|
2460
|
+
it('should error if - missing id', (done) => {
|
|
2461
|
+
try {
|
|
2462
|
+
a.getTrafficPolicy(null, null, (data, error) => {
|
|
2463
|
+
try {
|
|
2464
|
+
const displayE = 'id is required';
|
|
2465
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-getTrafficPolicy', displayE);
|
|
2466
|
+
done();
|
|
2467
|
+
} catch (err) {
|
|
2468
|
+
log.error(`Test Failure: ${err}`);
|
|
2469
|
+
done(err);
|
|
2470
|
+
}
|
|
2471
|
+
});
|
|
2472
|
+
} catch (error) {
|
|
2473
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2474
|
+
done(error);
|
|
2475
|
+
}
|
|
2476
|
+
}).timeout(attemptTimeout);
|
|
2477
|
+
it('should error if - missing version', (done) => {
|
|
2478
|
+
try {
|
|
2479
|
+
a.getTrafficPolicy('fakeparam', null, (data, error) => {
|
|
2480
|
+
try {
|
|
2481
|
+
const displayE = 'version is required';
|
|
2482
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-getTrafficPolicy', displayE);
|
|
2483
|
+
done();
|
|
2484
|
+
} catch (err) {
|
|
2485
|
+
log.error(`Test Failure: ${err}`);
|
|
2486
|
+
done(err);
|
|
2487
|
+
}
|
|
2488
|
+
});
|
|
2489
|
+
} catch (error) {
|
|
2490
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2491
|
+
done(error);
|
|
2492
|
+
}
|
|
2493
|
+
}).timeout(attemptTimeout);
|
|
2494
|
+
});
|
|
2495
|
+
|
|
2496
|
+
describe('#updateTrafficPolicyComment - errors', () => {
|
|
2497
|
+
it('should have a updateTrafficPolicyComment function', (done) => {
|
|
2498
|
+
try {
|
|
2499
|
+
assert.equal(true, typeof a.updateTrafficPolicyComment === 'function');
|
|
2500
|
+
done();
|
|
2501
|
+
} catch (error) {
|
|
2502
|
+
log.error(`Test Failure: ${error}`);
|
|
2503
|
+
done(error);
|
|
2504
|
+
}
|
|
2505
|
+
}).timeout(attemptTimeout);
|
|
2506
|
+
it('should error if - missing id', (done) => {
|
|
2507
|
+
try {
|
|
2508
|
+
a.updateTrafficPolicyComment(null, null, null, (data, error) => {
|
|
2509
|
+
try {
|
|
2510
|
+
const displayE = 'id is required';
|
|
2511
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-updateTrafficPolicyComment', displayE);
|
|
2512
|
+
done();
|
|
2513
|
+
} catch (err) {
|
|
2514
|
+
log.error(`Test Failure: ${err}`);
|
|
2515
|
+
done(err);
|
|
2516
|
+
}
|
|
2517
|
+
});
|
|
2518
|
+
} catch (error) {
|
|
2519
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2520
|
+
done(error);
|
|
2521
|
+
}
|
|
2522
|
+
}).timeout(attemptTimeout);
|
|
2523
|
+
it('should error if - missing version', (done) => {
|
|
2524
|
+
try {
|
|
2525
|
+
a.updateTrafficPolicyComment('fakeparam', null, null, (data, error) => {
|
|
2526
|
+
try {
|
|
2527
|
+
const displayE = 'version is required';
|
|
2528
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-updateTrafficPolicyComment', displayE);
|
|
2529
|
+
done();
|
|
2530
|
+
} catch (err) {
|
|
2531
|
+
log.error(`Test Failure: ${err}`);
|
|
2532
|
+
done(err);
|
|
2533
|
+
}
|
|
2534
|
+
});
|
|
2535
|
+
} catch (error) {
|
|
2536
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2537
|
+
done(error);
|
|
2538
|
+
}
|
|
2539
|
+
}).timeout(attemptTimeout);
|
|
2540
|
+
it('should error if - missing body', (done) => {
|
|
2541
|
+
try {
|
|
2542
|
+
a.updateTrafficPolicyComment('fakeparam', 'fakeparam', null, (data, error) => {
|
|
2543
|
+
try {
|
|
2544
|
+
const displayE = 'body is required';
|
|
2545
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-updateTrafficPolicyComment', displayE);
|
|
2546
|
+
done();
|
|
2547
|
+
} catch (err) {
|
|
2548
|
+
log.error(`Test Failure: ${err}`);
|
|
2549
|
+
done(err);
|
|
2550
|
+
}
|
|
2551
|
+
});
|
|
2552
|
+
} catch (error) {
|
|
2553
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2554
|
+
done(error);
|
|
2555
|
+
}
|
|
2556
|
+
}).timeout(attemptTimeout);
|
|
2557
|
+
});
|
|
2558
|
+
|
|
2559
|
+
describe('#deleteTrafficPolicyInstance - errors', () => {
|
|
2560
|
+
it('should have a deleteTrafficPolicyInstance function', (done) => {
|
|
2561
|
+
try {
|
|
2562
|
+
assert.equal(true, typeof a.deleteTrafficPolicyInstance === 'function');
|
|
2563
|
+
done();
|
|
2564
|
+
} catch (error) {
|
|
2565
|
+
log.error(`Test Failure: ${error}`);
|
|
2566
|
+
done(error);
|
|
2567
|
+
}
|
|
2568
|
+
}).timeout(attemptTimeout);
|
|
2569
|
+
it('should error if - missing id', (done) => {
|
|
2570
|
+
try {
|
|
2571
|
+
a.deleteTrafficPolicyInstance(null, (data, error) => {
|
|
2572
|
+
try {
|
|
2573
|
+
const displayE = 'id is required';
|
|
2574
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-deleteTrafficPolicyInstance', displayE);
|
|
2575
|
+
done();
|
|
2576
|
+
} catch (err) {
|
|
2577
|
+
log.error(`Test Failure: ${err}`);
|
|
2578
|
+
done(err);
|
|
2579
|
+
}
|
|
2580
|
+
});
|
|
2581
|
+
} catch (error) {
|
|
2582
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2583
|
+
done(error);
|
|
2584
|
+
}
|
|
2585
|
+
}).timeout(attemptTimeout);
|
|
2586
|
+
});
|
|
2587
|
+
|
|
2588
|
+
describe('#getTrafficPolicyInstance - errors', () => {
|
|
2589
|
+
it('should have a getTrafficPolicyInstance function', (done) => {
|
|
2590
|
+
try {
|
|
2591
|
+
assert.equal(true, typeof a.getTrafficPolicyInstance === 'function');
|
|
2592
|
+
done();
|
|
2593
|
+
} catch (error) {
|
|
2594
|
+
log.error(`Test Failure: ${error}`);
|
|
2595
|
+
done(error);
|
|
2596
|
+
}
|
|
2597
|
+
}).timeout(attemptTimeout);
|
|
2598
|
+
it('should error if - missing id', (done) => {
|
|
2599
|
+
try {
|
|
2600
|
+
a.getTrafficPolicyInstance(null, (data, error) => {
|
|
2601
|
+
try {
|
|
2602
|
+
const displayE = 'id is required';
|
|
2603
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-getTrafficPolicyInstance', displayE);
|
|
2604
|
+
done();
|
|
2605
|
+
} catch (err) {
|
|
2606
|
+
log.error(`Test Failure: ${err}`);
|
|
2607
|
+
done(err);
|
|
2608
|
+
}
|
|
2609
|
+
});
|
|
2610
|
+
} catch (error) {
|
|
2611
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2612
|
+
done(error);
|
|
2613
|
+
}
|
|
2614
|
+
}).timeout(attemptTimeout);
|
|
2615
|
+
});
|
|
2616
|
+
|
|
2617
|
+
describe('#updateTrafficPolicyInstance - errors', () => {
|
|
2618
|
+
it('should have a updateTrafficPolicyInstance function', (done) => {
|
|
2619
|
+
try {
|
|
2620
|
+
assert.equal(true, typeof a.updateTrafficPolicyInstance === 'function');
|
|
2621
|
+
done();
|
|
2622
|
+
} catch (error) {
|
|
2623
|
+
log.error(`Test Failure: ${error}`);
|
|
2624
|
+
done(error);
|
|
2625
|
+
}
|
|
2626
|
+
}).timeout(attemptTimeout);
|
|
2627
|
+
it('should error if - missing id', (done) => {
|
|
2628
|
+
try {
|
|
2629
|
+
a.updateTrafficPolicyInstance(null, null, (data, error) => {
|
|
2630
|
+
try {
|
|
2631
|
+
const displayE = 'id is required';
|
|
2632
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-updateTrafficPolicyInstance', displayE);
|
|
2633
|
+
done();
|
|
2634
|
+
} catch (err) {
|
|
2635
|
+
log.error(`Test Failure: ${err}`);
|
|
2636
|
+
done(err);
|
|
2637
|
+
}
|
|
2638
|
+
});
|
|
2639
|
+
} catch (error) {
|
|
2640
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2641
|
+
done(error);
|
|
2642
|
+
}
|
|
2643
|
+
}).timeout(attemptTimeout);
|
|
2644
|
+
it('should error if - missing body', (done) => {
|
|
2645
|
+
try {
|
|
2646
|
+
a.updateTrafficPolicyInstance('fakeparam', null, (data, error) => {
|
|
2647
|
+
try {
|
|
2648
|
+
const displayE = 'body is required';
|
|
2649
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-updateTrafficPolicyInstance', displayE);
|
|
2650
|
+
done();
|
|
2651
|
+
} catch (err) {
|
|
2652
|
+
log.error(`Test Failure: ${err}`);
|
|
2653
|
+
done(err);
|
|
2654
|
+
}
|
|
2655
|
+
});
|
|
2656
|
+
} catch (error) {
|
|
2657
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2658
|
+
done(error);
|
|
2659
|
+
}
|
|
2660
|
+
}).timeout(attemptTimeout);
|
|
2661
|
+
});
|
|
2662
|
+
|
|
2663
|
+
describe('#deleteVPCAssociationAuthorization - errors', () => {
|
|
2664
|
+
it('should have a deleteVPCAssociationAuthorization function', (done) => {
|
|
2665
|
+
try {
|
|
2666
|
+
assert.equal(true, typeof a.deleteVPCAssociationAuthorization === 'function');
|
|
2667
|
+
done();
|
|
2668
|
+
} catch (error) {
|
|
2669
|
+
log.error(`Test Failure: ${error}`);
|
|
2670
|
+
done(error);
|
|
2671
|
+
}
|
|
2672
|
+
}).timeout(attemptTimeout);
|
|
2673
|
+
it('should error if - missing id', (done) => {
|
|
2674
|
+
try {
|
|
2675
|
+
a.deleteVPCAssociationAuthorization(null, null, (data, error) => {
|
|
2676
|
+
try {
|
|
2677
|
+
const displayE = 'id is required';
|
|
2678
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-deleteVPCAssociationAuthorization', displayE);
|
|
2679
|
+
done();
|
|
2680
|
+
} catch (err) {
|
|
2681
|
+
log.error(`Test Failure: ${err}`);
|
|
2682
|
+
done(err);
|
|
2683
|
+
}
|
|
2684
|
+
});
|
|
2685
|
+
} catch (error) {
|
|
2686
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2687
|
+
done(error);
|
|
2688
|
+
}
|
|
2689
|
+
}).timeout(attemptTimeout);
|
|
2690
|
+
it('should error if - missing body', (done) => {
|
|
2691
|
+
try {
|
|
2692
|
+
a.deleteVPCAssociationAuthorization('fakeparam', null, (data, error) => {
|
|
2693
|
+
try {
|
|
2694
|
+
const displayE = 'body is required';
|
|
2695
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-deleteVPCAssociationAuthorization', displayE);
|
|
2696
|
+
done();
|
|
2697
|
+
} catch (err) {
|
|
2698
|
+
log.error(`Test Failure: ${err}`);
|
|
2699
|
+
done(err);
|
|
2700
|
+
}
|
|
2701
|
+
});
|
|
2702
|
+
} catch (error) {
|
|
2703
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2704
|
+
done(error);
|
|
2705
|
+
}
|
|
2706
|
+
}).timeout(attemptTimeout);
|
|
2707
|
+
});
|
|
2708
|
+
|
|
2709
|
+
describe('#disableHostedZoneDNSSEC - errors', () => {
|
|
2710
|
+
it('should have a disableHostedZoneDNSSEC function', (done) => {
|
|
2711
|
+
try {
|
|
2712
|
+
assert.equal(true, typeof a.disableHostedZoneDNSSEC === 'function');
|
|
2713
|
+
done();
|
|
2714
|
+
} catch (error) {
|
|
2715
|
+
log.error(`Test Failure: ${error}`);
|
|
2716
|
+
done(error);
|
|
2717
|
+
}
|
|
2718
|
+
}).timeout(attemptTimeout);
|
|
2719
|
+
it('should error if - missing id', (done) => {
|
|
2720
|
+
try {
|
|
2721
|
+
a.disableHostedZoneDNSSEC(null, (data, error) => {
|
|
2722
|
+
try {
|
|
2723
|
+
const displayE = 'id is required';
|
|
2724
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-disableHostedZoneDNSSEC', displayE);
|
|
2725
|
+
done();
|
|
2726
|
+
} catch (err) {
|
|
2727
|
+
log.error(`Test Failure: ${err}`);
|
|
2728
|
+
done(err);
|
|
2729
|
+
}
|
|
2730
|
+
});
|
|
2731
|
+
} catch (error) {
|
|
2732
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2733
|
+
done(error);
|
|
2734
|
+
}
|
|
2735
|
+
}).timeout(attemptTimeout);
|
|
2736
|
+
});
|
|
2737
|
+
|
|
2738
|
+
describe('#disassociateVPCFromHostedZone - errors', () => {
|
|
2739
|
+
it('should have a disassociateVPCFromHostedZone function', (done) => {
|
|
2740
|
+
try {
|
|
2741
|
+
assert.equal(true, typeof a.disassociateVPCFromHostedZone === 'function');
|
|
2742
|
+
done();
|
|
2743
|
+
} catch (error) {
|
|
2744
|
+
log.error(`Test Failure: ${error}`);
|
|
2745
|
+
done(error);
|
|
2746
|
+
}
|
|
2747
|
+
}).timeout(attemptTimeout);
|
|
2748
|
+
it('should error if - missing id', (done) => {
|
|
2749
|
+
try {
|
|
2750
|
+
a.disassociateVPCFromHostedZone(null, null, (data, error) => {
|
|
2751
|
+
try {
|
|
2752
|
+
const displayE = 'id is required';
|
|
2753
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-disassociateVPCFromHostedZone', displayE);
|
|
2754
|
+
done();
|
|
2755
|
+
} catch (err) {
|
|
2756
|
+
log.error(`Test Failure: ${err}`);
|
|
2757
|
+
done(err);
|
|
2758
|
+
}
|
|
2759
|
+
});
|
|
2760
|
+
} catch (error) {
|
|
2761
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2762
|
+
done(error);
|
|
2763
|
+
}
|
|
2764
|
+
}).timeout(attemptTimeout);
|
|
2765
|
+
it('should error if - missing body', (done) => {
|
|
2766
|
+
try {
|
|
2767
|
+
a.disassociateVPCFromHostedZone('fakeparam', null, (data, error) => {
|
|
2768
|
+
try {
|
|
2769
|
+
const displayE = 'body is required';
|
|
2770
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-disassociateVPCFromHostedZone', displayE);
|
|
2771
|
+
done();
|
|
2772
|
+
} catch (err) {
|
|
2773
|
+
log.error(`Test Failure: ${err}`);
|
|
2774
|
+
done(err);
|
|
2775
|
+
}
|
|
2776
|
+
});
|
|
2777
|
+
} catch (error) {
|
|
2778
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2779
|
+
done(error);
|
|
2780
|
+
}
|
|
2781
|
+
}).timeout(attemptTimeout);
|
|
2782
|
+
});
|
|
2783
|
+
|
|
2784
|
+
describe('#enableHostedZoneDNSSEC - errors', () => {
|
|
2785
|
+
it('should have a enableHostedZoneDNSSEC function', (done) => {
|
|
2786
|
+
try {
|
|
2787
|
+
assert.equal(true, typeof a.enableHostedZoneDNSSEC === 'function');
|
|
2788
|
+
done();
|
|
2789
|
+
} catch (error) {
|
|
2790
|
+
log.error(`Test Failure: ${error}`);
|
|
2791
|
+
done(error);
|
|
2792
|
+
}
|
|
2793
|
+
}).timeout(attemptTimeout);
|
|
2794
|
+
it('should error if - missing id', (done) => {
|
|
2795
|
+
try {
|
|
2796
|
+
a.enableHostedZoneDNSSEC(null, (data, error) => {
|
|
2797
|
+
try {
|
|
2798
|
+
const displayE = 'id is required';
|
|
2799
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-enableHostedZoneDNSSEC', 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
|
+
});
|
|
2812
|
+
|
|
2813
|
+
describe('#getAccountLimit - errors', () => {
|
|
2814
|
+
it('should have a getAccountLimit function', (done) => {
|
|
2815
|
+
try {
|
|
2816
|
+
assert.equal(true, typeof a.getAccountLimit === 'function');
|
|
2817
|
+
done();
|
|
2818
|
+
} catch (error) {
|
|
2819
|
+
log.error(`Test Failure: ${error}`);
|
|
2820
|
+
done(error);
|
|
2821
|
+
}
|
|
2822
|
+
}).timeout(attemptTimeout);
|
|
2823
|
+
it('should error if - missing type', (done) => {
|
|
2824
|
+
try {
|
|
2825
|
+
a.getAccountLimit(null, (data, error) => {
|
|
2826
|
+
try {
|
|
2827
|
+
const displayE = 'type is required';
|
|
2828
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-getAccountLimit', displayE);
|
|
2829
|
+
done();
|
|
2830
|
+
} catch (err) {
|
|
2831
|
+
log.error(`Test Failure: ${err}`);
|
|
2832
|
+
done(err);
|
|
2833
|
+
}
|
|
2834
|
+
});
|
|
2835
|
+
} catch (error) {
|
|
2836
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2837
|
+
done(error);
|
|
2838
|
+
}
|
|
2839
|
+
}).timeout(attemptTimeout);
|
|
2840
|
+
});
|
|
2841
|
+
|
|
2842
|
+
describe('#getChange - errors', () => {
|
|
2843
|
+
it('should have a getChange function', (done) => {
|
|
2844
|
+
try {
|
|
2845
|
+
assert.equal(true, typeof a.getChange === 'function');
|
|
2846
|
+
done();
|
|
2847
|
+
} catch (error) {
|
|
2848
|
+
log.error(`Test Failure: ${error}`);
|
|
2849
|
+
done(error);
|
|
2850
|
+
}
|
|
2851
|
+
}).timeout(attemptTimeout);
|
|
2852
|
+
it('should error if - missing id', (done) => {
|
|
2853
|
+
try {
|
|
2854
|
+
a.getChange(null, (data, error) => {
|
|
2855
|
+
try {
|
|
2856
|
+
const displayE = 'id is required';
|
|
2857
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-getChange', displayE);
|
|
2858
|
+
done();
|
|
2859
|
+
} catch (err) {
|
|
2860
|
+
log.error(`Test Failure: ${err}`);
|
|
2861
|
+
done(err);
|
|
2862
|
+
}
|
|
2863
|
+
});
|
|
2864
|
+
} catch (error) {
|
|
2865
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2866
|
+
done(error);
|
|
2867
|
+
}
|
|
2868
|
+
}).timeout(attemptTimeout);
|
|
2869
|
+
});
|
|
2870
|
+
|
|
2871
|
+
describe('#getCheckerIpRanges - errors', () => {
|
|
2872
|
+
it('should have a getCheckerIpRanges function', (done) => {
|
|
2873
|
+
try {
|
|
2874
|
+
assert.equal(true, typeof a.getCheckerIpRanges === 'function');
|
|
2875
|
+
done();
|
|
2876
|
+
} catch (error) {
|
|
2877
|
+
log.error(`Test Failure: ${error}`);
|
|
2878
|
+
done(error);
|
|
2879
|
+
}
|
|
2880
|
+
}).timeout(attemptTimeout);
|
|
2881
|
+
});
|
|
2882
|
+
|
|
2883
|
+
describe('#getDNSSEC - errors', () => {
|
|
2884
|
+
it('should have a getDNSSEC function', (done) => {
|
|
2885
|
+
try {
|
|
2886
|
+
assert.equal(true, typeof a.getDNSSEC === 'function');
|
|
2887
|
+
done();
|
|
2888
|
+
} catch (error) {
|
|
2889
|
+
log.error(`Test Failure: ${error}`);
|
|
2890
|
+
done(error);
|
|
2891
|
+
}
|
|
2892
|
+
}).timeout(attemptTimeout);
|
|
2893
|
+
it('should error if - missing id', (done) => {
|
|
2894
|
+
try {
|
|
2895
|
+
a.getDNSSEC(null, (data, error) => {
|
|
2896
|
+
try {
|
|
2897
|
+
const displayE = 'id is required';
|
|
2898
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-getDNSSEC', displayE);
|
|
2899
|
+
done();
|
|
2900
|
+
} catch (err) {
|
|
2901
|
+
log.error(`Test Failure: ${err}`);
|
|
2902
|
+
done(err);
|
|
2903
|
+
}
|
|
2904
|
+
});
|
|
2905
|
+
} catch (error) {
|
|
2906
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2907
|
+
done(error);
|
|
2908
|
+
}
|
|
2909
|
+
}).timeout(attemptTimeout);
|
|
2910
|
+
});
|
|
2911
|
+
|
|
2912
|
+
describe('#getGeoLocation - errors', () => {
|
|
2913
|
+
it('should have a getGeoLocation function', (done) => {
|
|
2914
|
+
try {
|
|
2915
|
+
assert.equal(true, typeof a.getGeoLocation === 'function');
|
|
2916
|
+
done();
|
|
2917
|
+
} catch (error) {
|
|
2918
|
+
log.error(`Test Failure: ${error}`);
|
|
2919
|
+
done(error);
|
|
2920
|
+
}
|
|
2921
|
+
}).timeout(attemptTimeout);
|
|
2922
|
+
});
|
|
2923
|
+
|
|
2924
|
+
describe('#getHealthCheckCount - errors', () => {
|
|
2925
|
+
it('should have a getHealthCheckCount function', (done) => {
|
|
2926
|
+
try {
|
|
2927
|
+
assert.equal(true, typeof a.getHealthCheckCount === 'function');
|
|
2928
|
+
done();
|
|
2929
|
+
} catch (error) {
|
|
2930
|
+
log.error(`Test Failure: ${error}`);
|
|
2931
|
+
done(error);
|
|
2932
|
+
}
|
|
2933
|
+
}).timeout(attemptTimeout);
|
|
2934
|
+
});
|
|
2935
|
+
|
|
2936
|
+
describe('#getHealthCheckLastFailureReason - errors', () => {
|
|
2937
|
+
it('should have a getHealthCheckLastFailureReason function', (done) => {
|
|
2938
|
+
try {
|
|
2939
|
+
assert.equal(true, typeof a.getHealthCheckLastFailureReason === 'function');
|
|
2940
|
+
done();
|
|
2941
|
+
} catch (error) {
|
|
2942
|
+
log.error(`Test Failure: ${error}`);
|
|
2943
|
+
done(error);
|
|
2944
|
+
}
|
|
2945
|
+
}).timeout(attemptTimeout);
|
|
2946
|
+
it('should error if - missing healthCheckId', (done) => {
|
|
2947
|
+
try {
|
|
2948
|
+
a.getHealthCheckLastFailureReason(null, (data, error) => {
|
|
2949
|
+
try {
|
|
2950
|
+
const displayE = 'healthCheckId is required';
|
|
2951
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-getHealthCheckLastFailureReason', displayE);
|
|
2952
|
+
done();
|
|
2953
|
+
} catch (err) {
|
|
2954
|
+
log.error(`Test Failure: ${err}`);
|
|
2955
|
+
done(err);
|
|
2956
|
+
}
|
|
2957
|
+
});
|
|
2958
|
+
} catch (error) {
|
|
2959
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2960
|
+
done(error);
|
|
2961
|
+
}
|
|
2962
|
+
}).timeout(attemptTimeout);
|
|
2963
|
+
});
|
|
2964
|
+
|
|
2965
|
+
describe('#getHealthCheckStatus - errors', () => {
|
|
2966
|
+
it('should have a getHealthCheckStatus function', (done) => {
|
|
2967
|
+
try {
|
|
2968
|
+
assert.equal(true, typeof a.getHealthCheckStatus === 'function');
|
|
2969
|
+
done();
|
|
2970
|
+
} catch (error) {
|
|
2971
|
+
log.error(`Test Failure: ${error}`);
|
|
2972
|
+
done(error);
|
|
2973
|
+
}
|
|
2974
|
+
}).timeout(attemptTimeout);
|
|
2975
|
+
it('should error if - missing healthCheckId', (done) => {
|
|
2976
|
+
try {
|
|
2977
|
+
a.getHealthCheckStatus(null, (data, error) => {
|
|
2978
|
+
try {
|
|
2979
|
+
const displayE = 'healthCheckId is required';
|
|
2980
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-getHealthCheckStatus', displayE);
|
|
2981
|
+
done();
|
|
2982
|
+
} catch (err) {
|
|
2983
|
+
log.error(`Test Failure: ${err}`);
|
|
2984
|
+
done(err);
|
|
2985
|
+
}
|
|
2986
|
+
});
|
|
2987
|
+
} catch (error) {
|
|
2988
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2989
|
+
done(error);
|
|
2990
|
+
}
|
|
2991
|
+
}).timeout(attemptTimeout);
|
|
2992
|
+
});
|
|
2993
|
+
|
|
2994
|
+
describe('#getHostedZoneCount - errors', () => {
|
|
2995
|
+
it('should have a getHostedZoneCount function', (done) => {
|
|
2996
|
+
try {
|
|
2997
|
+
assert.equal(true, typeof a.getHostedZoneCount === 'function');
|
|
2998
|
+
done();
|
|
2999
|
+
} catch (error) {
|
|
3000
|
+
log.error(`Test Failure: ${error}`);
|
|
3001
|
+
done(error);
|
|
3002
|
+
}
|
|
3003
|
+
}).timeout(attemptTimeout);
|
|
3004
|
+
});
|
|
3005
|
+
|
|
3006
|
+
describe('#getHostedZoneLimit - errors', () => {
|
|
3007
|
+
it('should have a getHostedZoneLimit function', (done) => {
|
|
3008
|
+
try {
|
|
3009
|
+
assert.equal(true, typeof a.getHostedZoneLimit === 'function');
|
|
3010
|
+
done();
|
|
3011
|
+
} catch (error) {
|
|
3012
|
+
log.error(`Test Failure: ${error}`);
|
|
3013
|
+
done(error);
|
|
3014
|
+
}
|
|
3015
|
+
}).timeout(attemptTimeout);
|
|
3016
|
+
it('should error if - missing type', (done) => {
|
|
3017
|
+
try {
|
|
3018
|
+
a.getHostedZoneLimit(null, null, (data, error) => {
|
|
3019
|
+
try {
|
|
3020
|
+
const displayE = 'type is required';
|
|
3021
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-getHostedZoneLimit', displayE);
|
|
3022
|
+
done();
|
|
3023
|
+
} catch (err) {
|
|
3024
|
+
log.error(`Test Failure: ${err}`);
|
|
3025
|
+
done(err);
|
|
3026
|
+
}
|
|
3027
|
+
});
|
|
3028
|
+
} catch (error) {
|
|
3029
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3030
|
+
done(error);
|
|
3031
|
+
}
|
|
3032
|
+
}).timeout(attemptTimeout);
|
|
3033
|
+
it('should error if - missing id', (done) => {
|
|
3034
|
+
try {
|
|
3035
|
+
a.getHostedZoneLimit('fakeparam', null, (data, error) => {
|
|
3036
|
+
try {
|
|
3037
|
+
const displayE = 'id is required';
|
|
3038
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-getHostedZoneLimit', displayE);
|
|
3039
|
+
done();
|
|
3040
|
+
} catch (err) {
|
|
3041
|
+
log.error(`Test Failure: ${err}`);
|
|
3042
|
+
done(err);
|
|
3043
|
+
}
|
|
3044
|
+
});
|
|
3045
|
+
} catch (error) {
|
|
3046
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3047
|
+
done(error);
|
|
3048
|
+
}
|
|
3049
|
+
}).timeout(attemptTimeout);
|
|
3050
|
+
});
|
|
3051
|
+
|
|
3052
|
+
describe('#getReusableDelegationSetLimit - errors', () => {
|
|
3053
|
+
it('should have a getReusableDelegationSetLimit function', (done) => {
|
|
3054
|
+
try {
|
|
3055
|
+
assert.equal(true, typeof a.getReusableDelegationSetLimit === 'function');
|
|
3056
|
+
done();
|
|
3057
|
+
} catch (error) {
|
|
3058
|
+
log.error(`Test Failure: ${error}`);
|
|
3059
|
+
done(error);
|
|
3060
|
+
}
|
|
3061
|
+
}).timeout(attemptTimeout);
|
|
3062
|
+
it('should error if - missing type', (done) => {
|
|
3063
|
+
try {
|
|
3064
|
+
a.getReusableDelegationSetLimit(null, null, (data, error) => {
|
|
3065
|
+
try {
|
|
3066
|
+
const displayE = 'type is required';
|
|
3067
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-getReusableDelegationSetLimit', displayE);
|
|
3068
|
+
done();
|
|
3069
|
+
} catch (err) {
|
|
3070
|
+
log.error(`Test Failure: ${err}`);
|
|
3071
|
+
done(err);
|
|
3072
|
+
}
|
|
3073
|
+
});
|
|
3074
|
+
} catch (error) {
|
|
3075
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3076
|
+
done(error);
|
|
3077
|
+
}
|
|
3078
|
+
}).timeout(attemptTimeout);
|
|
3079
|
+
it('should error if - missing id', (done) => {
|
|
3080
|
+
try {
|
|
3081
|
+
a.getReusableDelegationSetLimit('fakeparam', null, (data, error) => {
|
|
3082
|
+
try {
|
|
3083
|
+
const displayE = 'id is required';
|
|
3084
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-getReusableDelegationSetLimit', displayE);
|
|
3085
|
+
done();
|
|
3086
|
+
} catch (err) {
|
|
3087
|
+
log.error(`Test Failure: ${err}`);
|
|
3088
|
+
done(err);
|
|
3089
|
+
}
|
|
3090
|
+
});
|
|
3091
|
+
} catch (error) {
|
|
3092
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3093
|
+
done(error);
|
|
3094
|
+
}
|
|
3095
|
+
}).timeout(attemptTimeout);
|
|
3096
|
+
});
|
|
3097
|
+
|
|
3098
|
+
describe('#getTrafficPolicyInstanceCount - errors', () => {
|
|
3099
|
+
it('should have a getTrafficPolicyInstanceCount function', (done) => {
|
|
3100
|
+
try {
|
|
3101
|
+
assert.equal(true, typeof a.getTrafficPolicyInstanceCount === 'function');
|
|
3102
|
+
done();
|
|
3103
|
+
} catch (error) {
|
|
3104
|
+
log.error(`Test Failure: ${error}`);
|
|
3105
|
+
done(error);
|
|
3106
|
+
}
|
|
3107
|
+
}).timeout(attemptTimeout);
|
|
3108
|
+
});
|
|
3109
|
+
|
|
3110
|
+
describe('#listGeoLocations - errors', () => {
|
|
3111
|
+
it('should have a listGeoLocations function', (done) => {
|
|
3112
|
+
try {
|
|
3113
|
+
assert.equal(true, typeof a.listGeoLocations === 'function');
|
|
3114
|
+
done();
|
|
3115
|
+
} catch (error) {
|
|
3116
|
+
log.error(`Test Failure: ${error}`);
|
|
3117
|
+
done(error);
|
|
3118
|
+
}
|
|
3119
|
+
}).timeout(attemptTimeout);
|
|
3120
|
+
});
|
|
3121
|
+
|
|
3122
|
+
describe('#listHostedZonesByName - errors', () => {
|
|
3123
|
+
it('should have a listHostedZonesByName function', (done) => {
|
|
3124
|
+
try {
|
|
3125
|
+
assert.equal(true, typeof a.listHostedZonesByName === 'function');
|
|
3126
|
+
done();
|
|
3127
|
+
} catch (error) {
|
|
3128
|
+
log.error(`Test Failure: ${error}`);
|
|
3129
|
+
done(error);
|
|
3130
|
+
}
|
|
3131
|
+
}).timeout(attemptTimeout);
|
|
3132
|
+
});
|
|
3133
|
+
|
|
3134
|
+
describe('#listHostedZonesByVPC - errors', () => {
|
|
3135
|
+
it('should have a listHostedZonesByVPC function', (done) => {
|
|
3136
|
+
try {
|
|
3137
|
+
assert.equal(true, typeof a.listHostedZonesByVPC === 'function');
|
|
3138
|
+
done();
|
|
3139
|
+
} catch (error) {
|
|
3140
|
+
log.error(`Test Failure: ${error}`);
|
|
3141
|
+
done(error);
|
|
3142
|
+
}
|
|
3143
|
+
}).timeout(attemptTimeout);
|
|
3144
|
+
it('should error if - missing vpcid', (done) => {
|
|
3145
|
+
try {
|
|
3146
|
+
a.listHostedZonesByVPC(null, null, null, null, (data, error) => {
|
|
3147
|
+
try {
|
|
3148
|
+
const displayE = 'vpcid is required';
|
|
3149
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-listHostedZonesByVPC', displayE);
|
|
3150
|
+
done();
|
|
3151
|
+
} catch (err) {
|
|
3152
|
+
log.error(`Test Failure: ${err}`);
|
|
3153
|
+
done(err);
|
|
3154
|
+
}
|
|
3155
|
+
});
|
|
3156
|
+
} catch (error) {
|
|
3157
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3158
|
+
done(error);
|
|
3159
|
+
}
|
|
3160
|
+
}).timeout(attemptTimeout);
|
|
3161
|
+
it('should error if - missing vpcregion', (done) => {
|
|
3162
|
+
try {
|
|
3163
|
+
a.listHostedZonesByVPC('fakeparam', null, null, null, (data, error) => {
|
|
3164
|
+
try {
|
|
3165
|
+
const displayE = 'vpcregion is required';
|
|
3166
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-listHostedZonesByVPC', displayE);
|
|
3167
|
+
done();
|
|
3168
|
+
} catch (err) {
|
|
3169
|
+
log.error(`Test Failure: ${err}`);
|
|
3170
|
+
done(err);
|
|
3171
|
+
}
|
|
3172
|
+
});
|
|
3173
|
+
} catch (error) {
|
|
3174
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3175
|
+
done(error);
|
|
3176
|
+
}
|
|
3177
|
+
}).timeout(attemptTimeout);
|
|
3178
|
+
});
|
|
3179
|
+
|
|
3180
|
+
describe('#listResourceRecordSets - errors', () => {
|
|
3181
|
+
it('should have a listResourceRecordSets function', (done) => {
|
|
3182
|
+
try {
|
|
3183
|
+
assert.equal(true, typeof a.listResourceRecordSets === 'function');
|
|
3184
|
+
done();
|
|
3185
|
+
} catch (error) {
|
|
3186
|
+
log.error(`Test Failure: ${error}`);
|
|
3187
|
+
done(error);
|
|
3188
|
+
}
|
|
3189
|
+
}).timeout(attemptTimeout);
|
|
3190
|
+
it('should error if - missing id', (done) => {
|
|
3191
|
+
try {
|
|
3192
|
+
a.listResourceRecordSets(null, null, null, null, null, null, null, null, null, (data, error) => {
|
|
3193
|
+
try {
|
|
3194
|
+
const displayE = 'id is required';
|
|
3195
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-listResourceRecordSets', displayE);
|
|
3196
|
+
done();
|
|
3197
|
+
} catch (err) {
|
|
3198
|
+
log.error(`Test Failure: ${err}`);
|
|
3199
|
+
done(err);
|
|
3200
|
+
}
|
|
3201
|
+
});
|
|
3202
|
+
} catch (error) {
|
|
3203
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3204
|
+
done(error);
|
|
3205
|
+
}
|
|
3206
|
+
}).timeout(attemptTimeout);
|
|
3207
|
+
});
|
|
3208
|
+
|
|
3209
|
+
describe('#listTagsForResources - errors', () => {
|
|
3210
|
+
it('should have a listTagsForResources function', (done) => {
|
|
3211
|
+
try {
|
|
3212
|
+
assert.equal(true, typeof a.listTagsForResources === 'function');
|
|
3213
|
+
done();
|
|
3214
|
+
} catch (error) {
|
|
3215
|
+
log.error(`Test Failure: ${error}`);
|
|
3216
|
+
done(error);
|
|
3217
|
+
}
|
|
3218
|
+
}).timeout(attemptTimeout);
|
|
3219
|
+
it('should error if - missing resourceType', (done) => {
|
|
3220
|
+
try {
|
|
3221
|
+
a.listTagsForResources(null, null, (data, error) => {
|
|
3222
|
+
try {
|
|
3223
|
+
const displayE = 'resourceType is required';
|
|
3224
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-listTagsForResources', displayE);
|
|
3225
|
+
done();
|
|
3226
|
+
} catch (err) {
|
|
3227
|
+
log.error(`Test Failure: ${err}`);
|
|
3228
|
+
done(err);
|
|
3229
|
+
}
|
|
3230
|
+
});
|
|
3231
|
+
} catch (error) {
|
|
3232
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3233
|
+
done(error);
|
|
3234
|
+
}
|
|
3235
|
+
}).timeout(attemptTimeout);
|
|
3236
|
+
it('should error if - missing body', (done) => {
|
|
3237
|
+
try {
|
|
3238
|
+
a.listTagsForResources('fakeparam', null, (data, error) => {
|
|
3239
|
+
try {
|
|
3240
|
+
const displayE = 'body is required';
|
|
3241
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-listTagsForResources', displayE);
|
|
3242
|
+
done();
|
|
3243
|
+
} catch (err) {
|
|
3244
|
+
log.error(`Test Failure: ${err}`);
|
|
3245
|
+
done(err);
|
|
3246
|
+
}
|
|
3247
|
+
});
|
|
3248
|
+
} catch (error) {
|
|
3249
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3250
|
+
done(error);
|
|
3251
|
+
}
|
|
3252
|
+
}).timeout(attemptTimeout);
|
|
3253
|
+
});
|
|
3254
|
+
|
|
3255
|
+
describe('#listTrafficPolicies - errors', () => {
|
|
3256
|
+
it('should have a listTrafficPolicies function', (done) => {
|
|
3257
|
+
try {
|
|
3258
|
+
assert.equal(true, typeof a.listTrafficPolicies === 'function');
|
|
3259
|
+
done();
|
|
3260
|
+
} catch (error) {
|
|
3261
|
+
log.error(`Test Failure: ${error}`);
|
|
3262
|
+
done(error);
|
|
3263
|
+
}
|
|
3264
|
+
}).timeout(attemptTimeout);
|
|
3265
|
+
});
|
|
3266
|
+
|
|
3267
|
+
describe('#listTrafficPolicyInstances - errors', () => {
|
|
3268
|
+
it('should have a listTrafficPolicyInstances function', (done) => {
|
|
3269
|
+
try {
|
|
3270
|
+
assert.equal(true, typeof a.listTrafficPolicyInstances === 'function');
|
|
3271
|
+
done();
|
|
3272
|
+
} catch (error) {
|
|
3273
|
+
log.error(`Test Failure: ${error}`);
|
|
3274
|
+
done(error);
|
|
3275
|
+
}
|
|
3276
|
+
}).timeout(attemptTimeout);
|
|
3277
|
+
});
|
|
3278
|
+
|
|
3279
|
+
describe('#listTrafficPolicyInstancesByHostedZone - errors', () => {
|
|
3280
|
+
it('should have a listTrafficPolicyInstancesByHostedZone function', (done) => {
|
|
3281
|
+
try {
|
|
3282
|
+
assert.equal(true, typeof a.listTrafficPolicyInstancesByHostedZone === 'function');
|
|
3283
|
+
done();
|
|
3284
|
+
} catch (error) {
|
|
3285
|
+
log.error(`Test Failure: ${error}`);
|
|
3286
|
+
done(error);
|
|
3287
|
+
}
|
|
3288
|
+
}).timeout(attemptTimeout);
|
|
3289
|
+
it('should error if - missing id', (done) => {
|
|
3290
|
+
try {
|
|
3291
|
+
a.listTrafficPolicyInstancesByHostedZone(null, null, null, null, (data, error) => {
|
|
3292
|
+
try {
|
|
3293
|
+
const displayE = 'id is required';
|
|
3294
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-listTrafficPolicyInstancesByHostedZone', displayE);
|
|
3295
|
+
done();
|
|
3296
|
+
} catch (err) {
|
|
3297
|
+
log.error(`Test Failure: ${err}`);
|
|
3298
|
+
done(err);
|
|
3299
|
+
}
|
|
3300
|
+
});
|
|
3301
|
+
} catch (error) {
|
|
3302
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3303
|
+
done(error);
|
|
3304
|
+
}
|
|
3305
|
+
}).timeout(attemptTimeout);
|
|
3306
|
+
});
|
|
3307
|
+
|
|
3308
|
+
describe('#listTrafficPolicyInstancesByPolicy - errors', () => {
|
|
3309
|
+
it('should have a listTrafficPolicyInstancesByPolicy function', (done) => {
|
|
3310
|
+
try {
|
|
3311
|
+
assert.equal(true, typeof a.listTrafficPolicyInstancesByPolicy === 'function');
|
|
3312
|
+
done();
|
|
3313
|
+
} catch (error) {
|
|
3314
|
+
log.error(`Test Failure: ${error}`);
|
|
3315
|
+
done(error);
|
|
3316
|
+
}
|
|
3317
|
+
}).timeout(attemptTimeout);
|
|
3318
|
+
it('should error if - missing id', (done) => {
|
|
3319
|
+
try {
|
|
3320
|
+
a.listTrafficPolicyInstancesByPolicy(null, null, null, null, null, null, (data, error) => {
|
|
3321
|
+
try {
|
|
3322
|
+
const displayE = 'id is required';
|
|
3323
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-listTrafficPolicyInstancesByPolicy', displayE);
|
|
3324
|
+
done();
|
|
3325
|
+
} catch (err) {
|
|
3326
|
+
log.error(`Test Failure: ${err}`);
|
|
3327
|
+
done(err);
|
|
3328
|
+
}
|
|
3329
|
+
});
|
|
3330
|
+
} catch (error) {
|
|
3331
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3332
|
+
done(error);
|
|
3333
|
+
}
|
|
3334
|
+
}).timeout(attemptTimeout);
|
|
3335
|
+
it('should error if - missing version', (done) => {
|
|
3336
|
+
try {
|
|
3337
|
+
a.listTrafficPolicyInstancesByPolicy('fakeparam', null, null, null, null, null, (data, error) => {
|
|
3338
|
+
try {
|
|
3339
|
+
const displayE = 'version is required';
|
|
3340
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-listTrafficPolicyInstancesByPolicy', displayE);
|
|
3341
|
+
done();
|
|
3342
|
+
} catch (err) {
|
|
3343
|
+
log.error(`Test Failure: ${err}`);
|
|
3344
|
+
done(err);
|
|
3345
|
+
}
|
|
3346
|
+
});
|
|
3347
|
+
} catch (error) {
|
|
3348
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3349
|
+
done(error);
|
|
3350
|
+
}
|
|
3351
|
+
}).timeout(attemptTimeout);
|
|
3352
|
+
});
|
|
3353
|
+
|
|
3354
|
+
describe('#listTrafficPolicyVersions - errors', () => {
|
|
3355
|
+
it('should have a listTrafficPolicyVersions function', (done) => {
|
|
3356
|
+
try {
|
|
3357
|
+
assert.equal(true, typeof a.listTrafficPolicyVersions === 'function');
|
|
3358
|
+
done();
|
|
3359
|
+
} catch (error) {
|
|
3360
|
+
log.error(`Test Failure: ${error}`);
|
|
3361
|
+
done(error);
|
|
3362
|
+
}
|
|
3363
|
+
}).timeout(attemptTimeout);
|
|
3364
|
+
it('should error if - missing id', (done) => {
|
|
3365
|
+
try {
|
|
3366
|
+
a.listTrafficPolicyVersions(null, null, null, (data, error) => {
|
|
3367
|
+
try {
|
|
3368
|
+
const displayE = 'id is required';
|
|
3369
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-listTrafficPolicyVersions', displayE);
|
|
3370
|
+
done();
|
|
3371
|
+
} catch (err) {
|
|
3372
|
+
log.error(`Test Failure: ${err}`);
|
|
3373
|
+
done(err);
|
|
3374
|
+
}
|
|
3375
|
+
});
|
|
3376
|
+
} catch (error) {
|
|
3377
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3378
|
+
done(error);
|
|
3379
|
+
}
|
|
3380
|
+
}).timeout(attemptTimeout);
|
|
3381
|
+
});
|
|
3382
|
+
|
|
3383
|
+
describe('#testDNSAnswer - errors', () => {
|
|
3384
|
+
it('should have a testDNSAnswer function', (done) => {
|
|
3385
|
+
try {
|
|
3386
|
+
assert.equal(true, typeof a.testDNSAnswer === 'function');
|
|
3387
|
+
done();
|
|
3388
|
+
} catch (error) {
|
|
3389
|
+
log.error(`Test Failure: ${error}`);
|
|
3390
|
+
done(error);
|
|
3391
|
+
}
|
|
3392
|
+
}).timeout(attemptTimeout);
|
|
3393
|
+
it('should error if - missing hostedzoneid', (done) => {
|
|
3394
|
+
try {
|
|
3395
|
+
a.testDNSAnswer(null, null, null, null, null, null, (data, error) => {
|
|
3396
|
+
try {
|
|
3397
|
+
const displayE = 'hostedzoneid is required';
|
|
3398
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-testDNSAnswer', displayE);
|
|
3399
|
+
done();
|
|
3400
|
+
} catch (err) {
|
|
3401
|
+
log.error(`Test Failure: ${err}`);
|
|
3402
|
+
done(err);
|
|
3403
|
+
}
|
|
3404
|
+
});
|
|
3405
|
+
} catch (error) {
|
|
3406
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3407
|
+
done(error);
|
|
3408
|
+
}
|
|
3409
|
+
}).timeout(attemptTimeout);
|
|
3410
|
+
it('should error if - missing recordname', (done) => {
|
|
3411
|
+
try {
|
|
3412
|
+
a.testDNSAnswer('fakeparam', null, null, null, null, null, (data, error) => {
|
|
3413
|
+
try {
|
|
3414
|
+
const displayE = 'recordname is required';
|
|
3415
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-testDNSAnswer', displayE);
|
|
3416
|
+
done();
|
|
3417
|
+
} catch (err) {
|
|
3418
|
+
log.error(`Test Failure: ${err}`);
|
|
3419
|
+
done(err);
|
|
3420
|
+
}
|
|
3421
|
+
});
|
|
3422
|
+
} catch (error) {
|
|
3423
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3424
|
+
done(error);
|
|
3425
|
+
}
|
|
3426
|
+
}).timeout(attemptTimeout);
|
|
3427
|
+
it('should error if - missing recordtype', (done) => {
|
|
3428
|
+
try {
|
|
3429
|
+
a.testDNSAnswer('fakeparam', 'fakeparam', null, null, null, null, (data, error) => {
|
|
3430
|
+
try {
|
|
3431
|
+
const displayE = 'recordtype is required';
|
|
3432
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-amazon_route53-adapter-testDNSAnswer', displayE);
|
|
3433
|
+
done();
|
|
3434
|
+
} catch (err) {
|
|
3435
|
+
log.error(`Test Failure: ${err}`);
|
|
3436
|
+
done(err);
|
|
3437
|
+
}
|
|
3438
|
+
});
|
|
3439
|
+
} catch (error) {
|
|
3440
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3441
|
+
done(error);
|
|
3442
|
+
}
|
|
3443
|
+
}).timeout(attemptTimeout);
|
|
3444
|
+
});
|
|
3445
|
+
});
|
|
3446
|
+
});
|