@itentialopensource/adapter-etsi_sol005 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 +10403 -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/Alarms/action.json +66 -0
- package/entities/Alarms/mockdatafiles/getAlarms-default.json +126 -0
- package/entities/Alarms/mockdatafiles/getAlarmsAlarmId-default.json +45 -0
- package/entities/Alarms/mockdatafiles/patchAlarmsAlarmId-default.json +3 -0
- package/entities/Alarms/schema.json +21 -0
- package/entities/ApiVersions/action.json +25 -0
- package/entities/ApiVersions/mockdatafiles/getApiVersions-default.json +55 -0
- package/entities/ApiVersions/schema.json +19 -0
- package/entities/CapacityThresholds/action.json +106 -0
- package/entities/CapacityThresholds/mockdatafiles/getCapacityThresholds-default.json +193 -0
- package/entities/CapacityThresholds/mockdatafiles/getCapacityThresholdsCapacityThresholdId-default.json +63 -0
- package/entities/CapacityThresholds/mockdatafiles/patchCapacityThresholdsCapacityThresholdId-default.json +26 -0
- package/entities/CapacityThresholds/mockdatafiles/postCapacityThresholds-default.json +50 -0
- package/entities/CapacityThresholds/schema.json +23 -0
- package/entities/NfviCapacityInfos/action.json +46 -0
- package/entities/NfviCapacityInfos/mockdatafiles/getNfviCapacityInfos-default.json +1457 -0
- package/entities/NfviCapacityInfos/mockdatafiles/getNfviCapacityInfosVimId-default.json +487 -0
- package/entities/NfviCapacityInfos/schema.json +20 -0
- package/entities/NsDescriptors/action.json +210 -0
- package/entities/NsDescriptors/mockdatafiles/getNsDescriptors-default.json +354 -0
- package/entities/NsDescriptors/mockdatafiles/getNsDescriptorsNsdInfoId-default.json +101 -0
- package/entities/NsDescriptors/mockdatafiles/patchNsDescriptorsNsdInfoId-default.json +10 -0
- package/entities/NsDescriptors/mockdatafiles/postNsDescriptors-default.json +136 -0
- package/entities/NsDescriptors/schema.json +83 -0
- package/entities/NsInstances/action.json +186 -0
- package/entities/NsInstances/mockdatafiles/querymultipleNSinstances-default.json +85311 -0
- package/entities/NsInstances/schema.json +27 -0
- package/entities/NsLcmOpOccs/action.json +106 -0
- package/entities/NsLcmOpOccs/mockdatafiles/querymultipleNSLCMoperationoccurrences-default.json +57603 -0
- package/entities/NsLcmOpOccs/schema.json +23 -0
- package/entities/Nslcm/action.json +44 -0
- package/entities/Nslcm/schema.json +20 -0
- package/entities/PmJobs/action.json +127 -0
- package/entities/PmJobs/mockdatafiles/getPmJobs-default.json +122 -0
- package/entities/PmJobs/mockdatafiles/getPmJobsPmJobId-default.json +60 -0
- package/entities/PmJobs/mockdatafiles/getPmJobsPmJobIdReportsReportId-default.json +148 -0
- package/entities/PmJobs/mockdatafiles/patchPmJobsPmJobId-default.json +22 -0
- package/entities/PmJobs/mockdatafiles/postPmJobs-default.json +52 -0
- package/entities/PmJobs/schema.json +24 -0
- package/entities/PnfDescriptors/action.json +210 -0
- package/entities/PnfDescriptors/mockdatafiles/getPnfDescriptors-default.json +113 -0
- package/entities/PnfDescriptors/mockdatafiles/getPnfDescriptorsPnfdInfoId-default.json +57 -0
- package/entities/PnfDescriptors/mockdatafiles/patchPnfDescriptorsPnfdInfoId-default.json +3 -0
- package/entities/PnfDescriptors/mockdatafiles/postPnfDescriptors-default.json +102 -0
- package/entities/PnfDescriptors/schema.json +83 -0
- package/entities/Subscriptions/action.json +86 -0
- package/entities/Subscriptions/mockdatafiles/getSubscriptions-default.json +482 -0
- package/entities/Subscriptions/mockdatafiles/getSubscriptionsSubscriptionId-default.json +152 -0
- package/entities/Subscriptions/mockdatafiles/postSubscriptions-default.json +151 -0
- package/entities/Subscriptions/schema.json +33 -0
- package/entities/Thresholds/action.json +106 -0
- package/entities/Thresholds/mockdatafiles/getThresholds-default.json +34 -0
- package/entities/Thresholds/mockdatafiles/getThresholdsThresholdId-default.json +30 -0
- package/entities/Thresholds/mockdatafiles/patchThresholdsThresholdId-default.json +18 -0
- package/entities/Thresholds/mockdatafiles/postThresholds-default.json +32 -0
- package/entities/Thresholds/schema.json +23 -0
- package/entities/VnfPackages/action.json +292 -0
- package/entities/VnfPackages/mockdatafiles/getVnfPackages-default.json +453 -0
- package/entities/VnfPackages/mockdatafiles/getVnfPackagesVnfPkgId-default.json +204 -0
- package/entities/VnfPackages/mockdatafiles/getVnfPackagesVnfPkgIdExtArtifactsAccess-default.json +14 -0
- package/entities/VnfPackages/mockdatafiles/patchVnfPackagesVnfPkgId-default.json +4 -0
- package/entities/VnfPackages/mockdatafiles/postVnfPackages-default.json +236 -0
- package/entities/VnfPackages/mockdatafiles/putVnfPackagesVnfPkgIdExtArtifactsAccess-default.json +14 -0
- package/entities/VnfPackages/schema.json +32 -0
- package/entities/VnfSnapshotPackages/action.json +289 -0
- package/entities/VnfSnapshotPackages/mockdatafiles/getVnfSnapshotPackages-default.json +227 -0
- package/entities/VnfSnapshotPackages/mockdatafiles/getVnfSnapshotPackagesVnfSnapshotPkgId-default.json +268 -0
- package/entities/VnfSnapshotPackages/mockdatafiles/patchVnfSnapshotPackagesVnfSnapshotPkgId-default.json +5 -0
- package/entities/VnfSnapshotPackages/mockdatafiles/postVnfSnapshotPackages-default.json +146 -0
- package/entities/VnfSnapshotPackages/schema.json +32 -0
- package/entities/VnfSnapshots/action.json +66 -0
- package/entities/VnfSnapshots/mockdatafiles/queryVNFsnapshots-default.json +1694 -0
- package/entities/VnfSnapshots/schema.json +21 -0
- package/error.json +184 -0
- package/package.json +85 -0
- package/pronghorn.json +18371 -0
- package/propertiesSchema.json +840 -0
- package/refs?service=git-upload-pack +0 -0
- package/report/creationReport.json +279 -0
- package/report/sol005_NSDmgmt_openapi.json +24207 -0
- package/report/sol005_capacity_openapi.json +14837 -0
- package/report/sol005_fault_openapi.json +8757 -0
- package/report/sol005_lifecycle_opneapi.json +61923 -0
- package/report/sol005_lifecycle_opneapi.json-OpenApi3Json.json +24758 -0
- package/report/sol005_package_openapi.json +19471 -0
- package/report/sol005_perf_openapi.json +11124 -0
- package/report/sol005_snapshot_openapi.json +16610 -0
- package/report/updateReport1646246505328.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 +3685 -0
- package/test/unit/adapterBaseTestUnit.js +944 -0
- package/test/unit/adapterTestUnit.js +4287 -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,4287 @@
|
|
|
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-etsi_sol005',
|
|
47
|
+
type: 'EtsiSol005',
|
|
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: 'request_token',
|
|
60
|
+
username,
|
|
61
|
+
password,
|
|
62
|
+
token: '',
|
|
63
|
+
invalid_token_error: 401,
|
|
64
|
+
token_timeout: 1800000,
|
|
65
|
+
token_cache: 'local',
|
|
66
|
+
auth_field: 'header.headers.Authorization',
|
|
67
|
+
auth_field_format: 'Bearer {token}',
|
|
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 EtsiSol005 = 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] Etsi_sol005 Adapter Test', () => {
|
|
219
|
+
describe('EtsiSol005 Class Tests', () => {
|
|
220
|
+
const a = new EtsiSol005(
|
|
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('etsi_sol005'));
|
|
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('etsi_sol005'));
|
|
450
|
+
assert.equal('Adapter', pronghornDotJson.type);
|
|
451
|
+
assert.equal('EtsiSol005', pronghornDotJson.export);
|
|
452
|
+
assert.equal('Etsi_sol005', 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-etsi_sol005', 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('etsi_sol005'));
|
|
809
|
+
assert.equal('EtsiSol005', 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('#getApiVersions - errors', () => {
|
|
1370
|
+
it('should have a getApiVersions function', (done) => {
|
|
1371
|
+
try {
|
|
1372
|
+
assert.equal(true, typeof a.getApiVersions === 'function');
|
|
1373
|
+
done();
|
|
1374
|
+
} catch (error) {
|
|
1375
|
+
log.error(`Test Failure: ${error}`);
|
|
1376
|
+
done(error);
|
|
1377
|
+
}
|
|
1378
|
+
}).timeout(attemptTimeout);
|
|
1379
|
+
});
|
|
1380
|
+
|
|
1381
|
+
describe('#postNsDescriptors - errors', () => {
|
|
1382
|
+
it('should have a postNsDescriptors function', (done) => {
|
|
1383
|
+
try {
|
|
1384
|
+
assert.equal(true, typeof a.postNsDescriptors === 'function');
|
|
1385
|
+
done();
|
|
1386
|
+
} catch (error) {
|
|
1387
|
+
log.error(`Test Failure: ${error}`);
|
|
1388
|
+
done(error);
|
|
1389
|
+
}
|
|
1390
|
+
}).timeout(attemptTimeout);
|
|
1391
|
+
it('should error if - missing body', (done) => {
|
|
1392
|
+
try {
|
|
1393
|
+
a.postNsDescriptors(null, (data, error) => {
|
|
1394
|
+
try {
|
|
1395
|
+
const displayE = 'body is required';
|
|
1396
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-postNsDescriptors', displayE);
|
|
1397
|
+
done();
|
|
1398
|
+
} catch (err) {
|
|
1399
|
+
log.error(`Test Failure: ${err}`);
|
|
1400
|
+
done(err);
|
|
1401
|
+
}
|
|
1402
|
+
});
|
|
1403
|
+
} catch (error) {
|
|
1404
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1405
|
+
done(error);
|
|
1406
|
+
}
|
|
1407
|
+
}).timeout(attemptTimeout);
|
|
1408
|
+
});
|
|
1409
|
+
|
|
1410
|
+
describe('#getNsDescriptors - errors', () => {
|
|
1411
|
+
it('should have a getNsDescriptors function', (done) => {
|
|
1412
|
+
try {
|
|
1413
|
+
assert.equal(true, typeof a.getNsDescriptors === 'function');
|
|
1414
|
+
done();
|
|
1415
|
+
} catch (error) {
|
|
1416
|
+
log.error(`Test Failure: ${error}`);
|
|
1417
|
+
done(error);
|
|
1418
|
+
}
|
|
1419
|
+
}).timeout(attemptTimeout);
|
|
1420
|
+
});
|
|
1421
|
+
|
|
1422
|
+
describe('#getNsDescriptorsNsdInfoId - errors', () => {
|
|
1423
|
+
it('should have a getNsDescriptorsNsdInfoId function', (done) => {
|
|
1424
|
+
try {
|
|
1425
|
+
assert.equal(true, typeof a.getNsDescriptorsNsdInfoId === 'function');
|
|
1426
|
+
done();
|
|
1427
|
+
} catch (error) {
|
|
1428
|
+
log.error(`Test Failure: ${error}`);
|
|
1429
|
+
done(error);
|
|
1430
|
+
}
|
|
1431
|
+
}).timeout(attemptTimeout);
|
|
1432
|
+
it('should error if - missing nsdInfoId', (done) => {
|
|
1433
|
+
try {
|
|
1434
|
+
a.getNsDescriptorsNsdInfoId(null, (data, error) => {
|
|
1435
|
+
try {
|
|
1436
|
+
const displayE = 'nsdInfoId is required';
|
|
1437
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-getNsDescriptorsNsdInfoId', displayE);
|
|
1438
|
+
done();
|
|
1439
|
+
} catch (err) {
|
|
1440
|
+
log.error(`Test Failure: ${err}`);
|
|
1441
|
+
done(err);
|
|
1442
|
+
}
|
|
1443
|
+
});
|
|
1444
|
+
} catch (error) {
|
|
1445
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1446
|
+
done(error);
|
|
1447
|
+
}
|
|
1448
|
+
}).timeout(attemptTimeout);
|
|
1449
|
+
});
|
|
1450
|
+
|
|
1451
|
+
describe('#patchNsDescriptorsNsdInfoId - errors', () => {
|
|
1452
|
+
it('should have a patchNsDescriptorsNsdInfoId function', (done) => {
|
|
1453
|
+
try {
|
|
1454
|
+
assert.equal(true, typeof a.patchNsDescriptorsNsdInfoId === 'function');
|
|
1455
|
+
done();
|
|
1456
|
+
} catch (error) {
|
|
1457
|
+
log.error(`Test Failure: ${error}`);
|
|
1458
|
+
done(error);
|
|
1459
|
+
}
|
|
1460
|
+
}).timeout(attemptTimeout);
|
|
1461
|
+
it('should error if - missing nsdInfoId', (done) => {
|
|
1462
|
+
try {
|
|
1463
|
+
a.patchNsDescriptorsNsdInfoId(null, null, (data, error) => {
|
|
1464
|
+
try {
|
|
1465
|
+
const displayE = 'nsdInfoId is required';
|
|
1466
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-patchNsDescriptorsNsdInfoId', displayE);
|
|
1467
|
+
done();
|
|
1468
|
+
} catch (err) {
|
|
1469
|
+
log.error(`Test Failure: ${err}`);
|
|
1470
|
+
done(err);
|
|
1471
|
+
}
|
|
1472
|
+
});
|
|
1473
|
+
} catch (error) {
|
|
1474
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1475
|
+
done(error);
|
|
1476
|
+
}
|
|
1477
|
+
}).timeout(attemptTimeout);
|
|
1478
|
+
it('should error if - missing body', (done) => {
|
|
1479
|
+
try {
|
|
1480
|
+
a.patchNsDescriptorsNsdInfoId('fakeparam', null, (data, error) => {
|
|
1481
|
+
try {
|
|
1482
|
+
const displayE = 'body is required';
|
|
1483
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-patchNsDescriptorsNsdInfoId', displayE);
|
|
1484
|
+
done();
|
|
1485
|
+
} catch (err) {
|
|
1486
|
+
log.error(`Test Failure: ${err}`);
|
|
1487
|
+
done(err);
|
|
1488
|
+
}
|
|
1489
|
+
});
|
|
1490
|
+
} catch (error) {
|
|
1491
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1492
|
+
done(error);
|
|
1493
|
+
}
|
|
1494
|
+
}).timeout(attemptTimeout);
|
|
1495
|
+
});
|
|
1496
|
+
|
|
1497
|
+
describe('#deleteNsDescriptorsNsdInfoId - errors', () => {
|
|
1498
|
+
it('should have a deleteNsDescriptorsNsdInfoId function', (done) => {
|
|
1499
|
+
try {
|
|
1500
|
+
assert.equal(true, typeof a.deleteNsDescriptorsNsdInfoId === 'function');
|
|
1501
|
+
done();
|
|
1502
|
+
} catch (error) {
|
|
1503
|
+
log.error(`Test Failure: ${error}`);
|
|
1504
|
+
done(error);
|
|
1505
|
+
}
|
|
1506
|
+
}).timeout(attemptTimeout);
|
|
1507
|
+
it('should error if - missing nsdInfoId', (done) => {
|
|
1508
|
+
try {
|
|
1509
|
+
a.deleteNsDescriptorsNsdInfoId(null, (data, error) => {
|
|
1510
|
+
try {
|
|
1511
|
+
const displayE = 'nsdInfoId is required';
|
|
1512
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-deleteNsDescriptorsNsdInfoId', displayE);
|
|
1513
|
+
done();
|
|
1514
|
+
} catch (err) {
|
|
1515
|
+
log.error(`Test Failure: ${err}`);
|
|
1516
|
+
done(err);
|
|
1517
|
+
}
|
|
1518
|
+
});
|
|
1519
|
+
} catch (error) {
|
|
1520
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1521
|
+
done(error);
|
|
1522
|
+
}
|
|
1523
|
+
}).timeout(attemptTimeout);
|
|
1524
|
+
});
|
|
1525
|
+
|
|
1526
|
+
describe('#getNsDescriptorsNsdInfoIdNsdContent - errors', () => {
|
|
1527
|
+
it('should have a getNsDescriptorsNsdInfoIdNsdContent function', (done) => {
|
|
1528
|
+
try {
|
|
1529
|
+
assert.equal(true, typeof a.getNsDescriptorsNsdInfoIdNsdContent === 'function');
|
|
1530
|
+
done();
|
|
1531
|
+
} catch (error) {
|
|
1532
|
+
log.error(`Test Failure: ${error}`);
|
|
1533
|
+
done(error);
|
|
1534
|
+
}
|
|
1535
|
+
}).timeout(attemptTimeout);
|
|
1536
|
+
it('should error if - missing nsdInfoId', (done) => {
|
|
1537
|
+
try {
|
|
1538
|
+
a.getNsDescriptorsNsdInfoIdNsdContent(null, (data, error) => {
|
|
1539
|
+
try {
|
|
1540
|
+
const displayE = 'nsdInfoId is required';
|
|
1541
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-getNsDescriptorsNsdInfoIdNsdContent', displayE);
|
|
1542
|
+
done();
|
|
1543
|
+
} catch (err) {
|
|
1544
|
+
log.error(`Test Failure: ${err}`);
|
|
1545
|
+
done(err);
|
|
1546
|
+
}
|
|
1547
|
+
});
|
|
1548
|
+
} catch (error) {
|
|
1549
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1550
|
+
done(error);
|
|
1551
|
+
}
|
|
1552
|
+
}).timeout(attemptTimeout);
|
|
1553
|
+
});
|
|
1554
|
+
|
|
1555
|
+
describe('#putNsDescriptorsNsdInfoIdNsdContent - errors', () => {
|
|
1556
|
+
it('should have a putNsDescriptorsNsdInfoIdNsdContent function', (done) => {
|
|
1557
|
+
try {
|
|
1558
|
+
assert.equal(true, typeof a.putNsDescriptorsNsdInfoIdNsdContent === 'function');
|
|
1559
|
+
done();
|
|
1560
|
+
} catch (error) {
|
|
1561
|
+
log.error(`Test Failure: ${error}`);
|
|
1562
|
+
done(error);
|
|
1563
|
+
}
|
|
1564
|
+
}).timeout(attemptTimeout);
|
|
1565
|
+
it('should error if - missing nsdInfoId', (done) => {
|
|
1566
|
+
try {
|
|
1567
|
+
a.putNsDescriptorsNsdInfoIdNsdContent(null, (data, error) => {
|
|
1568
|
+
try {
|
|
1569
|
+
const displayE = 'nsdInfoId is required';
|
|
1570
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-putNsDescriptorsNsdInfoIdNsdContent', displayE);
|
|
1571
|
+
done();
|
|
1572
|
+
} catch (err) {
|
|
1573
|
+
log.error(`Test Failure: ${err}`);
|
|
1574
|
+
done(err);
|
|
1575
|
+
}
|
|
1576
|
+
});
|
|
1577
|
+
} catch (error) {
|
|
1578
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1579
|
+
done(error);
|
|
1580
|
+
}
|
|
1581
|
+
}).timeout(attemptTimeout);
|
|
1582
|
+
});
|
|
1583
|
+
|
|
1584
|
+
describe('#getNsDescriptorsNsdInfoIdNsd - errors', () => {
|
|
1585
|
+
it('should have a getNsDescriptorsNsdInfoIdNsd function', (done) => {
|
|
1586
|
+
try {
|
|
1587
|
+
assert.equal(true, typeof a.getNsDescriptorsNsdInfoIdNsd === 'function');
|
|
1588
|
+
done();
|
|
1589
|
+
} catch (error) {
|
|
1590
|
+
log.error(`Test Failure: ${error}`);
|
|
1591
|
+
done(error);
|
|
1592
|
+
}
|
|
1593
|
+
}).timeout(attemptTimeout);
|
|
1594
|
+
it('should error if - missing nsdInfoId', (done) => {
|
|
1595
|
+
try {
|
|
1596
|
+
a.getNsDescriptorsNsdInfoIdNsd(null, null, (data, error) => {
|
|
1597
|
+
try {
|
|
1598
|
+
const displayE = 'nsdInfoId is required';
|
|
1599
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-getNsDescriptorsNsdInfoIdNsd', displayE);
|
|
1600
|
+
done();
|
|
1601
|
+
} catch (err) {
|
|
1602
|
+
log.error(`Test Failure: ${err}`);
|
|
1603
|
+
done(err);
|
|
1604
|
+
}
|
|
1605
|
+
});
|
|
1606
|
+
} catch (error) {
|
|
1607
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1608
|
+
done(error);
|
|
1609
|
+
}
|
|
1610
|
+
}).timeout(attemptTimeout);
|
|
1611
|
+
});
|
|
1612
|
+
|
|
1613
|
+
describe('#getNsDescriptorsNsdInfoIdManifest - errors', () => {
|
|
1614
|
+
it('should have a getNsDescriptorsNsdInfoIdManifest function', (done) => {
|
|
1615
|
+
try {
|
|
1616
|
+
assert.equal(true, typeof a.getNsDescriptorsNsdInfoIdManifest === 'function');
|
|
1617
|
+
done();
|
|
1618
|
+
} catch (error) {
|
|
1619
|
+
log.error(`Test Failure: ${error}`);
|
|
1620
|
+
done(error);
|
|
1621
|
+
}
|
|
1622
|
+
}).timeout(attemptTimeout);
|
|
1623
|
+
it('should error if - missing nsdInfoId', (done) => {
|
|
1624
|
+
try {
|
|
1625
|
+
a.getNsDescriptorsNsdInfoIdManifest(null, null, (data, error) => {
|
|
1626
|
+
try {
|
|
1627
|
+
const displayE = 'nsdInfoId is required';
|
|
1628
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-getNsDescriptorsNsdInfoIdManifest', displayE);
|
|
1629
|
+
done();
|
|
1630
|
+
} catch (err) {
|
|
1631
|
+
log.error(`Test Failure: ${err}`);
|
|
1632
|
+
done(err);
|
|
1633
|
+
}
|
|
1634
|
+
});
|
|
1635
|
+
} catch (error) {
|
|
1636
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1637
|
+
done(error);
|
|
1638
|
+
}
|
|
1639
|
+
}).timeout(attemptTimeout);
|
|
1640
|
+
});
|
|
1641
|
+
|
|
1642
|
+
describe('#getNsDescriptorsNsdInfoIdArtifactsArtifactPath - errors', () => {
|
|
1643
|
+
it('should have a getNsDescriptorsNsdInfoIdArtifactsArtifactPath function', (done) => {
|
|
1644
|
+
try {
|
|
1645
|
+
assert.equal(true, typeof a.getNsDescriptorsNsdInfoIdArtifactsArtifactPath === 'function');
|
|
1646
|
+
done();
|
|
1647
|
+
} catch (error) {
|
|
1648
|
+
log.error(`Test Failure: ${error}`);
|
|
1649
|
+
done(error);
|
|
1650
|
+
}
|
|
1651
|
+
}).timeout(attemptTimeout);
|
|
1652
|
+
it('should error if - missing nsdInfoId', (done) => {
|
|
1653
|
+
try {
|
|
1654
|
+
a.getNsDescriptorsNsdInfoIdArtifactsArtifactPath(null, null, null, (data, error) => {
|
|
1655
|
+
try {
|
|
1656
|
+
const displayE = 'nsdInfoId is required';
|
|
1657
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-getNsDescriptorsNsdInfoIdArtifactsArtifactPath', displayE);
|
|
1658
|
+
done();
|
|
1659
|
+
} catch (err) {
|
|
1660
|
+
log.error(`Test Failure: ${err}`);
|
|
1661
|
+
done(err);
|
|
1662
|
+
}
|
|
1663
|
+
});
|
|
1664
|
+
} catch (error) {
|
|
1665
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1666
|
+
done(error);
|
|
1667
|
+
}
|
|
1668
|
+
}).timeout(attemptTimeout);
|
|
1669
|
+
it('should error if - missing artifactPath', (done) => {
|
|
1670
|
+
try {
|
|
1671
|
+
a.getNsDescriptorsNsdInfoIdArtifactsArtifactPath('fakeparam', null, null, (data, error) => {
|
|
1672
|
+
try {
|
|
1673
|
+
const displayE = 'artifactPath is required';
|
|
1674
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-getNsDescriptorsNsdInfoIdArtifactsArtifactPath', displayE);
|
|
1675
|
+
done();
|
|
1676
|
+
} catch (err) {
|
|
1677
|
+
log.error(`Test Failure: ${err}`);
|
|
1678
|
+
done(err);
|
|
1679
|
+
}
|
|
1680
|
+
});
|
|
1681
|
+
} catch (error) {
|
|
1682
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1683
|
+
done(error);
|
|
1684
|
+
}
|
|
1685
|
+
}).timeout(attemptTimeout);
|
|
1686
|
+
});
|
|
1687
|
+
|
|
1688
|
+
describe('#postPnfDescriptors - errors', () => {
|
|
1689
|
+
it('should have a postPnfDescriptors function', (done) => {
|
|
1690
|
+
try {
|
|
1691
|
+
assert.equal(true, typeof a.postPnfDescriptors === 'function');
|
|
1692
|
+
done();
|
|
1693
|
+
} catch (error) {
|
|
1694
|
+
log.error(`Test Failure: ${error}`);
|
|
1695
|
+
done(error);
|
|
1696
|
+
}
|
|
1697
|
+
}).timeout(attemptTimeout);
|
|
1698
|
+
it('should error if - missing body', (done) => {
|
|
1699
|
+
try {
|
|
1700
|
+
a.postPnfDescriptors(null, (data, error) => {
|
|
1701
|
+
try {
|
|
1702
|
+
const displayE = 'body is required';
|
|
1703
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-postPnfDescriptors', displayE);
|
|
1704
|
+
done();
|
|
1705
|
+
} catch (err) {
|
|
1706
|
+
log.error(`Test Failure: ${err}`);
|
|
1707
|
+
done(err);
|
|
1708
|
+
}
|
|
1709
|
+
});
|
|
1710
|
+
} catch (error) {
|
|
1711
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1712
|
+
done(error);
|
|
1713
|
+
}
|
|
1714
|
+
}).timeout(attemptTimeout);
|
|
1715
|
+
});
|
|
1716
|
+
|
|
1717
|
+
describe('#getPnfDescriptors - errors', () => {
|
|
1718
|
+
it('should have a getPnfDescriptors function', (done) => {
|
|
1719
|
+
try {
|
|
1720
|
+
assert.equal(true, typeof a.getPnfDescriptors === 'function');
|
|
1721
|
+
done();
|
|
1722
|
+
} catch (error) {
|
|
1723
|
+
log.error(`Test Failure: ${error}`);
|
|
1724
|
+
done(error);
|
|
1725
|
+
}
|
|
1726
|
+
}).timeout(attemptTimeout);
|
|
1727
|
+
});
|
|
1728
|
+
|
|
1729
|
+
describe('#getPnfDescriptorsPnfdInfoId - errors', () => {
|
|
1730
|
+
it('should have a getPnfDescriptorsPnfdInfoId function', (done) => {
|
|
1731
|
+
try {
|
|
1732
|
+
assert.equal(true, typeof a.getPnfDescriptorsPnfdInfoId === 'function');
|
|
1733
|
+
done();
|
|
1734
|
+
} catch (error) {
|
|
1735
|
+
log.error(`Test Failure: ${error}`);
|
|
1736
|
+
done(error);
|
|
1737
|
+
}
|
|
1738
|
+
}).timeout(attemptTimeout);
|
|
1739
|
+
it('should error if - missing pnfdInfoId', (done) => {
|
|
1740
|
+
try {
|
|
1741
|
+
a.getPnfDescriptorsPnfdInfoId(null, (data, error) => {
|
|
1742
|
+
try {
|
|
1743
|
+
const displayE = 'pnfdInfoId is required';
|
|
1744
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-getPnfDescriptorsPnfdInfoId', displayE);
|
|
1745
|
+
done();
|
|
1746
|
+
} catch (err) {
|
|
1747
|
+
log.error(`Test Failure: ${err}`);
|
|
1748
|
+
done(err);
|
|
1749
|
+
}
|
|
1750
|
+
});
|
|
1751
|
+
} catch (error) {
|
|
1752
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1753
|
+
done(error);
|
|
1754
|
+
}
|
|
1755
|
+
}).timeout(attemptTimeout);
|
|
1756
|
+
});
|
|
1757
|
+
|
|
1758
|
+
describe('#patchPnfDescriptorsPnfdInfoId - errors', () => {
|
|
1759
|
+
it('should have a patchPnfDescriptorsPnfdInfoId function', (done) => {
|
|
1760
|
+
try {
|
|
1761
|
+
assert.equal(true, typeof a.patchPnfDescriptorsPnfdInfoId === 'function');
|
|
1762
|
+
done();
|
|
1763
|
+
} catch (error) {
|
|
1764
|
+
log.error(`Test Failure: ${error}`);
|
|
1765
|
+
done(error);
|
|
1766
|
+
}
|
|
1767
|
+
}).timeout(attemptTimeout);
|
|
1768
|
+
it('should error if - missing pnfdInfoId', (done) => {
|
|
1769
|
+
try {
|
|
1770
|
+
a.patchPnfDescriptorsPnfdInfoId(null, null, (data, error) => {
|
|
1771
|
+
try {
|
|
1772
|
+
const displayE = 'pnfdInfoId is required';
|
|
1773
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-patchPnfDescriptorsPnfdInfoId', displayE);
|
|
1774
|
+
done();
|
|
1775
|
+
} catch (err) {
|
|
1776
|
+
log.error(`Test Failure: ${err}`);
|
|
1777
|
+
done(err);
|
|
1778
|
+
}
|
|
1779
|
+
});
|
|
1780
|
+
} catch (error) {
|
|
1781
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1782
|
+
done(error);
|
|
1783
|
+
}
|
|
1784
|
+
}).timeout(attemptTimeout);
|
|
1785
|
+
it('should error if - missing body', (done) => {
|
|
1786
|
+
try {
|
|
1787
|
+
a.patchPnfDescriptorsPnfdInfoId('fakeparam', null, (data, error) => {
|
|
1788
|
+
try {
|
|
1789
|
+
const displayE = 'body is required';
|
|
1790
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-patchPnfDescriptorsPnfdInfoId', displayE);
|
|
1791
|
+
done();
|
|
1792
|
+
} catch (err) {
|
|
1793
|
+
log.error(`Test Failure: ${err}`);
|
|
1794
|
+
done(err);
|
|
1795
|
+
}
|
|
1796
|
+
});
|
|
1797
|
+
} catch (error) {
|
|
1798
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1799
|
+
done(error);
|
|
1800
|
+
}
|
|
1801
|
+
}).timeout(attemptTimeout);
|
|
1802
|
+
});
|
|
1803
|
+
|
|
1804
|
+
describe('#deletePnfDescriptorsPnfdInfoId - errors', () => {
|
|
1805
|
+
it('should have a deletePnfDescriptorsPnfdInfoId function', (done) => {
|
|
1806
|
+
try {
|
|
1807
|
+
assert.equal(true, typeof a.deletePnfDescriptorsPnfdInfoId === 'function');
|
|
1808
|
+
done();
|
|
1809
|
+
} catch (error) {
|
|
1810
|
+
log.error(`Test Failure: ${error}`);
|
|
1811
|
+
done(error);
|
|
1812
|
+
}
|
|
1813
|
+
}).timeout(attemptTimeout);
|
|
1814
|
+
it('should error if - missing pnfdInfoId', (done) => {
|
|
1815
|
+
try {
|
|
1816
|
+
a.deletePnfDescriptorsPnfdInfoId(null, (data, error) => {
|
|
1817
|
+
try {
|
|
1818
|
+
const displayE = 'pnfdInfoId is required';
|
|
1819
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-deletePnfDescriptorsPnfdInfoId', displayE);
|
|
1820
|
+
done();
|
|
1821
|
+
} catch (err) {
|
|
1822
|
+
log.error(`Test Failure: ${err}`);
|
|
1823
|
+
done(err);
|
|
1824
|
+
}
|
|
1825
|
+
});
|
|
1826
|
+
} catch (error) {
|
|
1827
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1828
|
+
done(error);
|
|
1829
|
+
}
|
|
1830
|
+
}).timeout(attemptTimeout);
|
|
1831
|
+
});
|
|
1832
|
+
|
|
1833
|
+
describe('#getPnfDescriptorsPnfdInfoIdPnfdContent - errors', () => {
|
|
1834
|
+
it('should have a getPnfDescriptorsPnfdInfoIdPnfdContent function', (done) => {
|
|
1835
|
+
try {
|
|
1836
|
+
assert.equal(true, typeof a.getPnfDescriptorsPnfdInfoIdPnfdContent === 'function');
|
|
1837
|
+
done();
|
|
1838
|
+
} catch (error) {
|
|
1839
|
+
log.error(`Test Failure: ${error}`);
|
|
1840
|
+
done(error);
|
|
1841
|
+
}
|
|
1842
|
+
}).timeout(attemptTimeout);
|
|
1843
|
+
it('should error if - missing pnfdInfoId', (done) => {
|
|
1844
|
+
try {
|
|
1845
|
+
a.getPnfDescriptorsPnfdInfoIdPnfdContent(null, (data, error) => {
|
|
1846
|
+
try {
|
|
1847
|
+
const displayE = 'pnfdInfoId is required';
|
|
1848
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-getPnfDescriptorsPnfdInfoIdPnfdContent', displayE);
|
|
1849
|
+
done();
|
|
1850
|
+
} catch (err) {
|
|
1851
|
+
log.error(`Test Failure: ${err}`);
|
|
1852
|
+
done(err);
|
|
1853
|
+
}
|
|
1854
|
+
});
|
|
1855
|
+
} catch (error) {
|
|
1856
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1857
|
+
done(error);
|
|
1858
|
+
}
|
|
1859
|
+
}).timeout(attemptTimeout);
|
|
1860
|
+
});
|
|
1861
|
+
|
|
1862
|
+
describe('#putPnfDescriptorsPnfdInfoIdPnfdContent - errors', () => {
|
|
1863
|
+
it('should have a putPnfDescriptorsPnfdInfoIdPnfdContent function', (done) => {
|
|
1864
|
+
try {
|
|
1865
|
+
assert.equal(true, typeof a.putPnfDescriptorsPnfdInfoIdPnfdContent === 'function');
|
|
1866
|
+
done();
|
|
1867
|
+
} catch (error) {
|
|
1868
|
+
log.error(`Test Failure: ${error}`);
|
|
1869
|
+
done(error);
|
|
1870
|
+
}
|
|
1871
|
+
}).timeout(attemptTimeout);
|
|
1872
|
+
it('should error if - missing pnfdInfoId', (done) => {
|
|
1873
|
+
try {
|
|
1874
|
+
a.putPnfDescriptorsPnfdInfoIdPnfdContent(null, (data, error) => {
|
|
1875
|
+
try {
|
|
1876
|
+
const displayE = 'pnfdInfoId is required';
|
|
1877
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-putPnfDescriptorsPnfdInfoIdPnfdContent', displayE);
|
|
1878
|
+
done();
|
|
1879
|
+
} catch (err) {
|
|
1880
|
+
log.error(`Test Failure: ${err}`);
|
|
1881
|
+
done(err);
|
|
1882
|
+
}
|
|
1883
|
+
});
|
|
1884
|
+
} catch (error) {
|
|
1885
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1886
|
+
done(error);
|
|
1887
|
+
}
|
|
1888
|
+
}).timeout(attemptTimeout);
|
|
1889
|
+
});
|
|
1890
|
+
|
|
1891
|
+
describe('#getPnfDescriptorsPnfdInfoIdPnfd - errors', () => {
|
|
1892
|
+
it('should have a getPnfDescriptorsPnfdInfoIdPnfd function', (done) => {
|
|
1893
|
+
try {
|
|
1894
|
+
assert.equal(true, typeof a.getPnfDescriptorsPnfdInfoIdPnfd === 'function');
|
|
1895
|
+
done();
|
|
1896
|
+
} catch (error) {
|
|
1897
|
+
log.error(`Test Failure: ${error}`);
|
|
1898
|
+
done(error);
|
|
1899
|
+
}
|
|
1900
|
+
}).timeout(attemptTimeout);
|
|
1901
|
+
it('should error if - missing pnfdInfoId', (done) => {
|
|
1902
|
+
try {
|
|
1903
|
+
a.getPnfDescriptorsPnfdInfoIdPnfd(null, null, (data, error) => {
|
|
1904
|
+
try {
|
|
1905
|
+
const displayE = 'pnfdInfoId is required';
|
|
1906
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-getPnfDescriptorsPnfdInfoIdPnfd', displayE);
|
|
1907
|
+
done();
|
|
1908
|
+
} catch (err) {
|
|
1909
|
+
log.error(`Test Failure: ${err}`);
|
|
1910
|
+
done(err);
|
|
1911
|
+
}
|
|
1912
|
+
});
|
|
1913
|
+
} catch (error) {
|
|
1914
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1915
|
+
done(error);
|
|
1916
|
+
}
|
|
1917
|
+
}).timeout(attemptTimeout);
|
|
1918
|
+
});
|
|
1919
|
+
|
|
1920
|
+
describe('#getPnfDescriptorsPnfdInfoIdManifest - errors', () => {
|
|
1921
|
+
it('should have a getPnfDescriptorsPnfdInfoIdManifest function', (done) => {
|
|
1922
|
+
try {
|
|
1923
|
+
assert.equal(true, typeof a.getPnfDescriptorsPnfdInfoIdManifest === 'function');
|
|
1924
|
+
done();
|
|
1925
|
+
} catch (error) {
|
|
1926
|
+
log.error(`Test Failure: ${error}`);
|
|
1927
|
+
done(error);
|
|
1928
|
+
}
|
|
1929
|
+
}).timeout(attemptTimeout);
|
|
1930
|
+
it('should error if - missing pnfdInfoId', (done) => {
|
|
1931
|
+
try {
|
|
1932
|
+
a.getPnfDescriptorsPnfdInfoIdManifest(null, null, (data, error) => {
|
|
1933
|
+
try {
|
|
1934
|
+
const displayE = 'pnfdInfoId is required';
|
|
1935
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-getPnfDescriptorsPnfdInfoIdManifest', displayE);
|
|
1936
|
+
done();
|
|
1937
|
+
} catch (err) {
|
|
1938
|
+
log.error(`Test Failure: ${err}`);
|
|
1939
|
+
done(err);
|
|
1940
|
+
}
|
|
1941
|
+
});
|
|
1942
|
+
} catch (error) {
|
|
1943
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1944
|
+
done(error);
|
|
1945
|
+
}
|
|
1946
|
+
}).timeout(attemptTimeout);
|
|
1947
|
+
});
|
|
1948
|
+
|
|
1949
|
+
describe('#getPnfDescriptorsPnfdInfoIdArtifactsArtifactPath - errors', () => {
|
|
1950
|
+
it('should have a getPnfDescriptorsPnfdInfoIdArtifactsArtifactPath function', (done) => {
|
|
1951
|
+
try {
|
|
1952
|
+
assert.equal(true, typeof a.getPnfDescriptorsPnfdInfoIdArtifactsArtifactPath === 'function');
|
|
1953
|
+
done();
|
|
1954
|
+
} catch (error) {
|
|
1955
|
+
log.error(`Test Failure: ${error}`);
|
|
1956
|
+
done(error);
|
|
1957
|
+
}
|
|
1958
|
+
}).timeout(attemptTimeout);
|
|
1959
|
+
it('should error if - missing pnfdInfoId', (done) => {
|
|
1960
|
+
try {
|
|
1961
|
+
a.getPnfDescriptorsPnfdInfoIdArtifactsArtifactPath(null, null, null, (data, error) => {
|
|
1962
|
+
try {
|
|
1963
|
+
const displayE = 'pnfdInfoId is required';
|
|
1964
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-getPnfDescriptorsPnfdInfoIdArtifactsArtifactPath', displayE);
|
|
1965
|
+
done();
|
|
1966
|
+
} catch (err) {
|
|
1967
|
+
log.error(`Test Failure: ${err}`);
|
|
1968
|
+
done(err);
|
|
1969
|
+
}
|
|
1970
|
+
});
|
|
1971
|
+
} catch (error) {
|
|
1972
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1973
|
+
done(error);
|
|
1974
|
+
}
|
|
1975
|
+
}).timeout(attemptTimeout);
|
|
1976
|
+
it('should error if - missing artifactPath', (done) => {
|
|
1977
|
+
try {
|
|
1978
|
+
a.getPnfDescriptorsPnfdInfoIdArtifactsArtifactPath('fakeparam', null, null, (data, error) => {
|
|
1979
|
+
try {
|
|
1980
|
+
const displayE = 'artifactPath is required';
|
|
1981
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-getPnfDescriptorsPnfdInfoIdArtifactsArtifactPath', displayE);
|
|
1982
|
+
done();
|
|
1983
|
+
} catch (err) {
|
|
1984
|
+
log.error(`Test Failure: ${err}`);
|
|
1985
|
+
done(err);
|
|
1986
|
+
}
|
|
1987
|
+
});
|
|
1988
|
+
} catch (error) {
|
|
1989
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1990
|
+
done(error);
|
|
1991
|
+
}
|
|
1992
|
+
}).timeout(attemptTimeout);
|
|
1993
|
+
});
|
|
1994
|
+
|
|
1995
|
+
describe('#postSubscriptions - errors', () => {
|
|
1996
|
+
it('should have a postSubscriptions function', (done) => {
|
|
1997
|
+
try {
|
|
1998
|
+
assert.equal(true, typeof a.postSubscriptions === 'function');
|
|
1999
|
+
done();
|
|
2000
|
+
} catch (error) {
|
|
2001
|
+
log.error(`Test Failure: ${error}`);
|
|
2002
|
+
done(error);
|
|
2003
|
+
}
|
|
2004
|
+
}).timeout(attemptTimeout);
|
|
2005
|
+
it('should error if - missing body', (done) => {
|
|
2006
|
+
try {
|
|
2007
|
+
a.postSubscriptions(null, (data, error) => {
|
|
2008
|
+
try {
|
|
2009
|
+
const displayE = 'body is required';
|
|
2010
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-postSubscriptions', displayE);
|
|
2011
|
+
done();
|
|
2012
|
+
} catch (err) {
|
|
2013
|
+
log.error(`Test Failure: ${err}`);
|
|
2014
|
+
done(err);
|
|
2015
|
+
}
|
|
2016
|
+
});
|
|
2017
|
+
} catch (error) {
|
|
2018
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2019
|
+
done(error);
|
|
2020
|
+
}
|
|
2021
|
+
}).timeout(attemptTimeout);
|
|
2022
|
+
});
|
|
2023
|
+
|
|
2024
|
+
describe('#getSubscriptions - errors', () => {
|
|
2025
|
+
it('should have a getSubscriptions function', (done) => {
|
|
2026
|
+
try {
|
|
2027
|
+
assert.equal(true, typeof a.getSubscriptions === 'function');
|
|
2028
|
+
done();
|
|
2029
|
+
} catch (error) {
|
|
2030
|
+
log.error(`Test Failure: ${error}`);
|
|
2031
|
+
done(error);
|
|
2032
|
+
}
|
|
2033
|
+
}).timeout(attemptTimeout);
|
|
2034
|
+
});
|
|
2035
|
+
|
|
2036
|
+
describe('#getSubscriptionsSubscriptionId - errors', () => {
|
|
2037
|
+
it('should have a getSubscriptionsSubscriptionId function', (done) => {
|
|
2038
|
+
try {
|
|
2039
|
+
assert.equal(true, typeof a.getSubscriptionsSubscriptionId === 'function');
|
|
2040
|
+
done();
|
|
2041
|
+
} catch (error) {
|
|
2042
|
+
log.error(`Test Failure: ${error}`);
|
|
2043
|
+
done(error);
|
|
2044
|
+
}
|
|
2045
|
+
}).timeout(attemptTimeout);
|
|
2046
|
+
it('should error if - missing subscriptionId', (done) => {
|
|
2047
|
+
try {
|
|
2048
|
+
a.getSubscriptionsSubscriptionId(null, (data, error) => {
|
|
2049
|
+
try {
|
|
2050
|
+
const displayE = 'subscriptionId is required';
|
|
2051
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-getSubscriptionsSubscriptionId', displayE);
|
|
2052
|
+
done();
|
|
2053
|
+
} catch (err) {
|
|
2054
|
+
log.error(`Test Failure: ${err}`);
|
|
2055
|
+
done(err);
|
|
2056
|
+
}
|
|
2057
|
+
});
|
|
2058
|
+
} catch (error) {
|
|
2059
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2060
|
+
done(error);
|
|
2061
|
+
}
|
|
2062
|
+
}).timeout(attemptTimeout);
|
|
2063
|
+
});
|
|
2064
|
+
|
|
2065
|
+
describe('#deleteSubscriptionsSubscriptionId - errors', () => {
|
|
2066
|
+
it('should have a deleteSubscriptionsSubscriptionId function', (done) => {
|
|
2067
|
+
try {
|
|
2068
|
+
assert.equal(true, typeof a.deleteSubscriptionsSubscriptionId === 'function');
|
|
2069
|
+
done();
|
|
2070
|
+
} catch (error) {
|
|
2071
|
+
log.error(`Test Failure: ${error}`);
|
|
2072
|
+
done(error);
|
|
2073
|
+
}
|
|
2074
|
+
}).timeout(attemptTimeout);
|
|
2075
|
+
it('should error if - missing subscriptionId', (done) => {
|
|
2076
|
+
try {
|
|
2077
|
+
a.deleteSubscriptionsSubscriptionId(null, (data, error) => {
|
|
2078
|
+
try {
|
|
2079
|
+
const displayE = 'subscriptionId is required';
|
|
2080
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-deleteSubscriptionsSubscriptionId', displayE);
|
|
2081
|
+
done();
|
|
2082
|
+
} catch (err) {
|
|
2083
|
+
log.error(`Test Failure: ${err}`);
|
|
2084
|
+
done(err);
|
|
2085
|
+
}
|
|
2086
|
+
});
|
|
2087
|
+
} catch (error) {
|
|
2088
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2089
|
+
done(error);
|
|
2090
|
+
}
|
|
2091
|
+
}).timeout(attemptTimeout);
|
|
2092
|
+
});
|
|
2093
|
+
|
|
2094
|
+
describe('#getAlarms - errors', () => {
|
|
2095
|
+
it('should have a getAlarms function', (done) => {
|
|
2096
|
+
try {
|
|
2097
|
+
assert.equal(true, typeof a.getAlarms === 'function');
|
|
2098
|
+
done();
|
|
2099
|
+
} catch (error) {
|
|
2100
|
+
log.error(`Test Failure: ${error}`);
|
|
2101
|
+
done(error);
|
|
2102
|
+
}
|
|
2103
|
+
}).timeout(attemptTimeout);
|
|
2104
|
+
});
|
|
2105
|
+
|
|
2106
|
+
describe('#getAlarmsAlarmId - errors', () => {
|
|
2107
|
+
it('should have a getAlarmsAlarmId function', (done) => {
|
|
2108
|
+
try {
|
|
2109
|
+
assert.equal(true, typeof a.getAlarmsAlarmId === 'function');
|
|
2110
|
+
done();
|
|
2111
|
+
} catch (error) {
|
|
2112
|
+
log.error(`Test Failure: ${error}`);
|
|
2113
|
+
done(error);
|
|
2114
|
+
}
|
|
2115
|
+
}).timeout(attemptTimeout);
|
|
2116
|
+
it('should error if - missing alarmId', (done) => {
|
|
2117
|
+
try {
|
|
2118
|
+
a.getAlarmsAlarmId(null, (data, error) => {
|
|
2119
|
+
try {
|
|
2120
|
+
const displayE = 'alarmId is required';
|
|
2121
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-getAlarmsAlarmId', displayE);
|
|
2122
|
+
done();
|
|
2123
|
+
} catch (err) {
|
|
2124
|
+
log.error(`Test Failure: ${err}`);
|
|
2125
|
+
done(err);
|
|
2126
|
+
}
|
|
2127
|
+
});
|
|
2128
|
+
} catch (error) {
|
|
2129
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2130
|
+
done(error);
|
|
2131
|
+
}
|
|
2132
|
+
}).timeout(attemptTimeout);
|
|
2133
|
+
});
|
|
2134
|
+
|
|
2135
|
+
describe('#patchAlarmsAlarmId - errors', () => {
|
|
2136
|
+
it('should have a patchAlarmsAlarmId function', (done) => {
|
|
2137
|
+
try {
|
|
2138
|
+
assert.equal(true, typeof a.patchAlarmsAlarmId === 'function');
|
|
2139
|
+
done();
|
|
2140
|
+
} catch (error) {
|
|
2141
|
+
log.error(`Test Failure: ${error}`);
|
|
2142
|
+
done(error);
|
|
2143
|
+
}
|
|
2144
|
+
}).timeout(attemptTimeout);
|
|
2145
|
+
it('should error if - missing alarmId', (done) => {
|
|
2146
|
+
try {
|
|
2147
|
+
a.patchAlarmsAlarmId(null, null, (data, error) => {
|
|
2148
|
+
try {
|
|
2149
|
+
const displayE = 'alarmId is required';
|
|
2150
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-patchAlarmsAlarmId', displayE);
|
|
2151
|
+
done();
|
|
2152
|
+
} catch (err) {
|
|
2153
|
+
log.error(`Test Failure: ${err}`);
|
|
2154
|
+
done(err);
|
|
2155
|
+
}
|
|
2156
|
+
});
|
|
2157
|
+
} catch (error) {
|
|
2158
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2159
|
+
done(error);
|
|
2160
|
+
}
|
|
2161
|
+
}).timeout(attemptTimeout);
|
|
2162
|
+
it('should error if - missing body', (done) => {
|
|
2163
|
+
try {
|
|
2164
|
+
a.patchAlarmsAlarmId('fakeparam', null, (data, error) => {
|
|
2165
|
+
try {
|
|
2166
|
+
const displayE = 'body is required';
|
|
2167
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-patchAlarmsAlarmId', displayE);
|
|
2168
|
+
done();
|
|
2169
|
+
} catch (err) {
|
|
2170
|
+
log.error(`Test Failure: ${err}`);
|
|
2171
|
+
done(err);
|
|
2172
|
+
}
|
|
2173
|
+
});
|
|
2174
|
+
} catch (error) {
|
|
2175
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2176
|
+
done(error);
|
|
2177
|
+
}
|
|
2178
|
+
}).timeout(attemptTimeout);
|
|
2179
|
+
});
|
|
2180
|
+
|
|
2181
|
+
describe('#getVnfPackages - errors', () => {
|
|
2182
|
+
it('should have a getVnfPackages function', (done) => {
|
|
2183
|
+
try {
|
|
2184
|
+
assert.equal(true, typeof a.getVnfPackages === 'function');
|
|
2185
|
+
done();
|
|
2186
|
+
} catch (error) {
|
|
2187
|
+
log.error(`Test Failure: ${error}`);
|
|
2188
|
+
done(error);
|
|
2189
|
+
}
|
|
2190
|
+
}).timeout(attemptTimeout);
|
|
2191
|
+
});
|
|
2192
|
+
|
|
2193
|
+
describe('#postVnfPackages - errors', () => {
|
|
2194
|
+
it('should have a postVnfPackages function', (done) => {
|
|
2195
|
+
try {
|
|
2196
|
+
assert.equal(true, typeof a.postVnfPackages === 'function');
|
|
2197
|
+
done();
|
|
2198
|
+
} catch (error) {
|
|
2199
|
+
log.error(`Test Failure: ${error}`);
|
|
2200
|
+
done(error);
|
|
2201
|
+
}
|
|
2202
|
+
}).timeout(attemptTimeout);
|
|
2203
|
+
it('should error if - missing body', (done) => {
|
|
2204
|
+
try {
|
|
2205
|
+
a.postVnfPackages(null, (data, error) => {
|
|
2206
|
+
try {
|
|
2207
|
+
const displayE = 'body is required';
|
|
2208
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-postVnfPackages', displayE);
|
|
2209
|
+
done();
|
|
2210
|
+
} catch (err) {
|
|
2211
|
+
log.error(`Test Failure: ${err}`);
|
|
2212
|
+
done(err);
|
|
2213
|
+
}
|
|
2214
|
+
});
|
|
2215
|
+
} catch (error) {
|
|
2216
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2217
|
+
done(error);
|
|
2218
|
+
}
|
|
2219
|
+
}).timeout(attemptTimeout);
|
|
2220
|
+
});
|
|
2221
|
+
|
|
2222
|
+
describe('#getVnfPackagesVnfPkgId - errors', () => {
|
|
2223
|
+
it('should have a getVnfPackagesVnfPkgId function', (done) => {
|
|
2224
|
+
try {
|
|
2225
|
+
assert.equal(true, typeof a.getVnfPackagesVnfPkgId === 'function');
|
|
2226
|
+
done();
|
|
2227
|
+
} catch (error) {
|
|
2228
|
+
log.error(`Test Failure: ${error}`);
|
|
2229
|
+
done(error);
|
|
2230
|
+
}
|
|
2231
|
+
}).timeout(attemptTimeout);
|
|
2232
|
+
it('should error if - missing vnfPkgId', (done) => {
|
|
2233
|
+
try {
|
|
2234
|
+
a.getVnfPackagesVnfPkgId(null, (data, error) => {
|
|
2235
|
+
try {
|
|
2236
|
+
const displayE = 'vnfPkgId is required';
|
|
2237
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-getVnfPackagesVnfPkgId', displayE);
|
|
2238
|
+
done();
|
|
2239
|
+
} catch (err) {
|
|
2240
|
+
log.error(`Test Failure: ${err}`);
|
|
2241
|
+
done(err);
|
|
2242
|
+
}
|
|
2243
|
+
});
|
|
2244
|
+
} catch (error) {
|
|
2245
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2246
|
+
done(error);
|
|
2247
|
+
}
|
|
2248
|
+
}).timeout(attemptTimeout);
|
|
2249
|
+
});
|
|
2250
|
+
|
|
2251
|
+
describe('#deleteVnfPackagesVnfPkgId - errors', () => {
|
|
2252
|
+
it('should have a deleteVnfPackagesVnfPkgId function', (done) => {
|
|
2253
|
+
try {
|
|
2254
|
+
assert.equal(true, typeof a.deleteVnfPackagesVnfPkgId === 'function');
|
|
2255
|
+
done();
|
|
2256
|
+
} catch (error) {
|
|
2257
|
+
log.error(`Test Failure: ${error}`);
|
|
2258
|
+
done(error);
|
|
2259
|
+
}
|
|
2260
|
+
}).timeout(attemptTimeout);
|
|
2261
|
+
it('should error if - missing vnfPkgId', (done) => {
|
|
2262
|
+
try {
|
|
2263
|
+
a.deleteVnfPackagesVnfPkgId(null, (data, error) => {
|
|
2264
|
+
try {
|
|
2265
|
+
const displayE = 'vnfPkgId is required';
|
|
2266
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-deleteVnfPackagesVnfPkgId', displayE);
|
|
2267
|
+
done();
|
|
2268
|
+
} catch (err) {
|
|
2269
|
+
log.error(`Test Failure: ${err}`);
|
|
2270
|
+
done(err);
|
|
2271
|
+
}
|
|
2272
|
+
});
|
|
2273
|
+
} catch (error) {
|
|
2274
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2275
|
+
done(error);
|
|
2276
|
+
}
|
|
2277
|
+
}).timeout(attemptTimeout);
|
|
2278
|
+
});
|
|
2279
|
+
|
|
2280
|
+
describe('#patchVnfPackagesVnfPkgId - errors', () => {
|
|
2281
|
+
it('should have a patchVnfPackagesVnfPkgId function', (done) => {
|
|
2282
|
+
try {
|
|
2283
|
+
assert.equal(true, typeof a.patchVnfPackagesVnfPkgId === 'function');
|
|
2284
|
+
done();
|
|
2285
|
+
} catch (error) {
|
|
2286
|
+
log.error(`Test Failure: ${error}`);
|
|
2287
|
+
done(error);
|
|
2288
|
+
}
|
|
2289
|
+
}).timeout(attemptTimeout);
|
|
2290
|
+
it('should error if - missing vnfPkgId', (done) => {
|
|
2291
|
+
try {
|
|
2292
|
+
a.patchVnfPackagesVnfPkgId(null, null, (data, error) => {
|
|
2293
|
+
try {
|
|
2294
|
+
const displayE = 'vnfPkgId is required';
|
|
2295
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-patchVnfPackagesVnfPkgId', displayE);
|
|
2296
|
+
done();
|
|
2297
|
+
} catch (err) {
|
|
2298
|
+
log.error(`Test Failure: ${err}`);
|
|
2299
|
+
done(err);
|
|
2300
|
+
}
|
|
2301
|
+
});
|
|
2302
|
+
} catch (error) {
|
|
2303
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2304
|
+
done(error);
|
|
2305
|
+
}
|
|
2306
|
+
}).timeout(attemptTimeout);
|
|
2307
|
+
it('should error if - missing body', (done) => {
|
|
2308
|
+
try {
|
|
2309
|
+
a.patchVnfPackagesVnfPkgId('fakeparam', null, (data, error) => {
|
|
2310
|
+
try {
|
|
2311
|
+
const displayE = 'body is required';
|
|
2312
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-patchVnfPackagesVnfPkgId', displayE);
|
|
2313
|
+
done();
|
|
2314
|
+
} catch (err) {
|
|
2315
|
+
log.error(`Test Failure: ${err}`);
|
|
2316
|
+
done(err);
|
|
2317
|
+
}
|
|
2318
|
+
});
|
|
2319
|
+
} catch (error) {
|
|
2320
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2321
|
+
done(error);
|
|
2322
|
+
}
|
|
2323
|
+
}).timeout(attemptTimeout);
|
|
2324
|
+
});
|
|
2325
|
+
|
|
2326
|
+
describe('#getVnfPackagesVnfPkgIdVnfd - errors', () => {
|
|
2327
|
+
it('should have a getVnfPackagesVnfPkgIdVnfd function', (done) => {
|
|
2328
|
+
try {
|
|
2329
|
+
assert.equal(true, typeof a.getVnfPackagesVnfPkgIdVnfd === 'function');
|
|
2330
|
+
done();
|
|
2331
|
+
} catch (error) {
|
|
2332
|
+
log.error(`Test Failure: ${error}`);
|
|
2333
|
+
done(error);
|
|
2334
|
+
}
|
|
2335
|
+
}).timeout(attemptTimeout);
|
|
2336
|
+
it('should error if - missing vnfPkgId', (done) => {
|
|
2337
|
+
try {
|
|
2338
|
+
a.getVnfPackagesVnfPkgIdVnfd(null, null, (data, error) => {
|
|
2339
|
+
try {
|
|
2340
|
+
const displayE = 'vnfPkgId is required';
|
|
2341
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-getVnfPackagesVnfPkgIdVnfd', displayE);
|
|
2342
|
+
done();
|
|
2343
|
+
} catch (err) {
|
|
2344
|
+
log.error(`Test Failure: ${err}`);
|
|
2345
|
+
done(err);
|
|
2346
|
+
}
|
|
2347
|
+
});
|
|
2348
|
+
} catch (error) {
|
|
2349
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2350
|
+
done(error);
|
|
2351
|
+
}
|
|
2352
|
+
}).timeout(attemptTimeout);
|
|
2353
|
+
});
|
|
2354
|
+
|
|
2355
|
+
describe('#getVnfPackagesVnfPkgIdExtArtifactsAccess - errors', () => {
|
|
2356
|
+
it('should have a getVnfPackagesVnfPkgIdExtArtifactsAccess function', (done) => {
|
|
2357
|
+
try {
|
|
2358
|
+
assert.equal(true, typeof a.getVnfPackagesVnfPkgIdExtArtifactsAccess === 'function');
|
|
2359
|
+
done();
|
|
2360
|
+
} catch (error) {
|
|
2361
|
+
log.error(`Test Failure: ${error}`);
|
|
2362
|
+
done(error);
|
|
2363
|
+
}
|
|
2364
|
+
}).timeout(attemptTimeout);
|
|
2365
|
+
it('should error if - missing vnfPkgId', (done) => {
|
|
2366
|
+
try {
|
|
2367
|
+
a.getVnfPackagesVnfPkgIdExtArtifactsAccess(null, (data, error) => {
|
|
2368
|
+
try {
|
|
2369
|
+
const displayE = 'vnfPkgId is required';
|
|
2370
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-getVnfPackagesVnfPkgIdExtArtifactsAccess', displayE);
|
|
2371
|
+
done();
|
|
2372
|
+
} catch (err) {
|
|
2373
|
+
log.error(`Test Failure: ${err}`);
|
|
2374
|
+
done(err);
|
|
2375
|
+
}
|
|
2376
|
+
});
|
|
2377
|
+
} catch (error) {
|
|
2378
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2379
|
+
done(error);
|
|
2380
|
+
}
|
|
2381
|
+
}).timeout(attemptTimeout);
|
|
2382
|
+
});
|
|
2383
|
+
|
|
2384
|
+
describe('#putVnfPackagesVnfPkgIdExtArtifactsAccess - errors', () => {
|
|
2385
|
+
it('should have a putVnfPackagesVnfPkgIdExtArtifactsAccess function', (done) => {
|
|
2386
|
+
try {
|
|
2387
|
+
assert.equal(true, typeof a.putVnfPackagesVnfPkgIdExtArtifactsAccess === 'function');
|
|
2388
|
+
done();
|
|
2389
|
+
} catch (error) {
|
|
2390
|
+
log.error(`Test Failure: ${error}`);
|
|
2391
|
+
done(error);
|
|
2392
|
+
}
|
|
2393
|
+
}).timeout(attemptTimeout);
|
|
2394
|
+
it('should error if - missing vnfPkgId', (done) => {
|
|
2395
|
+
try {
|
|
2396
|
+
a.putVnfPackagesVnfPkgIdExtArtifactsAccess(null, null, (data, error) => {
|
|
2397
|
+
try {
|
|
2398
|
+
const displayE = 'vnfPkgId is required';
|
|
2399
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-putVnfPackagesVnfPkgIdExtArtifactsAccess', displayE);
|
|
2400
|
+
done();
|
|
2401
|
+
} catch (err) {
|
|
2402
|
+
log.error(`Test Failure: ${err}`);
|
|
2403
|
+
done(err);
|
|
2404
|
+
}
|
|
2405
|
+
});
|
|
2406
|
+
} catch (error) {
|
|
2407
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2408
|
+
done(error);
|
|
2409
|
+
}
|
|
2410
|
+
}).timeout(attemptTimeout);
|
|
2411
|
+
it('should error if - missing body', (done) => {
|
|
2412
|
+
try {
|
|
2413
|
+
a.putVnfPackagesVnfPkgIdExtArtifactsAccess('fakeparam', null, (data, error) => {
|
|
2414
|
+
try {
|
|
2415
|
+
const displayE = 'body is required';
|
|
2416
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-putVnfPackagesVnfPkgIdExtArtifactsAccess', displayE);
|
|
2417
|
+
done();
|
|
2418
|
+
} catch (err) {
|
|
2419
|
+
log.error(`Test Failure: ${err}`);
|
|
2420
|
+
done(err);
|
|
2421
|
+
}
|
|
2422
|
+
});
|
|
2423
|
+
} catch (error) {
|
|
2424
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2425
|
+
done(error);
|
|
2426
|
+
}
|
|
2427
|
+
}).timeout(attemptTimeout);
|
|
2428
|
+
});
|
|
2429
|
+
|
|
2430
|
+
describe('#getVnfPackagesVnfPkgIdManifest - errors', () => {
|
|
2431
|
+
it('should have a getVnfPackagesVnfPkgIdManifest function', (done) => {
|
|
2432
|
+
try {
|
|
2433
|
+
assert.equal(true, typeof a.getVnfPackagesVnfPkgIdManifest === 'function');
|
|
2434
|
+
done();
|
|
2435
|
+
} catch (error) {
|
|
2436
|
+
log.error(`Test Failure: ${error}`);
|
|
2437
|
+
done(error);
|
|
2438
|
+
}
|
|
2439
|
+
}).timeout(attemptTimeout);
|
|
2440
|
+
it('should error if - missing vnfPkgId', (done) => {
|
|
2441
|
+
try {
|
|
2442
|
+
a.getVnfPackagesVnfPkgIdManifest(null, null, (data, error) => {
|
|
2443
|
+
try {
|
|
2444
|
+
const displayE = 'vnfPkgId is required';
|
|
2445
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-getVnfPackagesVnfPkgIdManifest', displayE);
|
|
2446
|
+
done();
|
|
2447
|
+
} catch (err) {
|
|
2448
|
+
log.error(`Test Failure: ${err}`);
|
|
2449
|
+
done(err);
|
|
2450
|
+
}
|
|
2451
|
+
});
|
|
2452
|
+
} catch (error) {
|
|
2453
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2454
|
+
done(error);
|
|
2455
|
+
}
|
|
2456
|
+
}).timeout(attemptTimeout);
|
|
2457
|
+
});
|
|
2458
|
+
|
|
2459
|
+
describe('#getVnfPackagesVnfPkgIdPackageContent - errors', () => {
|
|
2460
|
+
it('should have a getVnfPackagesVnfPkgIdPackageContent function', (done) => {
|
|
2461
|
+
try {
|
|
2462
|
+
assert.equal(true, typeof a.getVnfPackagesVnfPkgIdPackageContent === 'function');
|
|
2463
|
+
done();
|
|
2464
|
+
} catch (error) {
|
|
2465
|
+
log.error(`Test Failure: ${error}`);
|
|
2466
|
+
done(error);
|
|
2467
|
+
}
|
|
2468
|
+
}).timeout(attemptTimeout);
|
|
2469
|
+
it('should error if - missing vnfPkgId', (done) => {
|
|
2470
|
+
try {
|
|
2471
|
+
a.getVnfPackagesVnfPkgIdPackageContent(null, (data, error) => {
|
|
2472
|
+
try {
|
|
2473
|
+
const displayE = 'vnfPkgId is required';
|
|
2474
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-getVnfPackagesVnfPkgIdPackageContent', displayE);
|
|
2475
|
+
done();
|
|
2476
|
+
} catch (err) {
|
|
2477
|
+
log.error(`Test Failure: ${err}`);
|
|
2478
|
+
done(err);
|
|
2479
|
+
}
|
|
2480
|
+
});
|
|
2481
|
+
} catch (error) {
|
|
2482
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2483
|
+
done(error);
|
|
2484
|
+
}
|
|
2485
|
+
}).timeout(attemptTimeout);
|
|
2486
|
+
});
|
|
2487
|
+
|
|
2488
|
+
describe('#putVnfPackagesVnfPkgIdPackageContent - errors', () => {
|
|
2489
|
+
it('should have a putVnfPackagesVnfPkgIdPackageContent function', (done) => {
|
|
2490
|
+
try {
|
|
2491
|
+
assert.equal(true, typeof a.putVnfPackagesVnfPkgIdPackageContent === 'function');
|
|
2492
|
+
done();
|
|
2493
|
+
} catch (error) {
|
|
2494
|
+
log.error(`Test Failure: ${error}`);
|
|
2495
|
+
done(error);
|
|
2496
|
+
}
|
|
2497
|
+
}).timeout(attemptTimeout);
|
|
2498
|
+
it('should error if - missing vnfPkgId', (done) => {
|
|
2499
|
+
try {
|
|
2500
|
+
a.putVnfPackagesVnfPkgIdPackageContent(null, null, (data, error) => {
|
|
2501
|
+
try {
|
|
2502
|
+
const displayE = 'vnfPkgId is required';
|
|
2503
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-putVnfPackagesVnfPkgIdPackageContent', displayE);
|
|
2504
|
+
done();
|
|
2505
|
+
} catch (err) {
|
|
2506
|
+
log.error(`Test Failure: ${err}`);
|
|
2507
|
+
done(err);
|
|
2508
|
+
}
|
|
2509
|
+
});
|
|
2510
|
+
} catch (error) {
|
|
2511
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2512
|
+
done(error);
|
|
2513
|
+
}
|
|
2514
|
+
}).timeout(attemptTimeout);
|
|
2515
|
+
it('should error if - missing body', (done) => {
|
|
2516
|
+
try {
|
|
2517
|
+
a.putVnfPackagesVnfPkgIdPackageContent('fakeparam', null, (data, error) => {
|
|
2518
|
+
try {
|
|
2519
|
+
const displayE = 'body is required';
|
|
2520
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-putVnfPackagesVnfPkgIdPackageContent', displayE);
|
|
2521
|
+
done();
|
|
2522
|
+
} catch (err) {
|
|
2523
|
+
log.error(`Test Failure: ${err}`);
|
|
2524
|
+
done(err);
|
|
2525
|
+
}
|
|
2526
|
+
});
|
|
2527
|
+
} catch (error) {
|
|
2528
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2529
|
+
done(error);
|
|
2530
|
+
}
|
|
2531
|
+
}).timeout(attemptTimeout);
|
|
2532
|
+
});
|
|
2533
|
+
|
|
2534
|
+
describe('#getVnfPackagesVnfPkgIdArtifacts - errors', () => {
|
|
2535
|
+
it('should have a getVnfPackagesVnfPkgIdArtifacts function', (done) => {
|
|
2536
|
+
try {
|
|
2537
|
+
assert.equal(true, typeof a.getVnfPackagesVnfPkgIdArtifacts === 'function');
|
|
2538
|
+
done();
|
|
2539
|
+
} catch (error) {
|
|
2540
|
+
log.error(`Test Failure: ${error}`);
|
|
2541
|
+
done(error);
|
|
2542
|
+
}
|
|
2543
|
+
}).timeout(attemptTimeout);
|
|
2544
|
+
it('should error if - missing vnfPkgId', (done) => {
|
|
2545
|
+
try {
|
|
2546
|
+
a.getVnfPackagesVnfPkgIdArtifacts(null, null, null, null, null, null, (data, error) => {
|
|
2547
|
+
try {
|
|
2548
|
+
const displayE = 'vnfPkgId is required';
|
|
2549
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-getVnfPackagesVnfPkgIdArtifacts', displayE);
|
|
2550
|
+
done();
|
|
2551
|
+
} catch (err) {
|
|
2552
|
+
log.error(`Test Failure: ${err}`);
|
|
2553
|
+
done(err);
|
|
2554
|
+
}
|
|
2555
|
+
});
|
|
2556
|
+
} catch (error) {
|
|
2557
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2558
|
+
done(error);
|
|
2559
|
+
}
|
|
2560
|
+
}).timeout(attemptTimeout);
|
|
2561
|
+
});
|
|
2562
|
+
|
|
2563
|
+
describe('#postVnfPackagesVnfPkgIdPackageContentUploadFromUri - errors', () => {
|
|
2564
|
+
it('should have a postVnfPackagesVnfPkgIdPackageContentUploadFromUri function', (done) => {
|
|
2565
|
+
try {
|
|
2566
|
+
assert.equal(true, typeof a.postVnfPackagesVnfPkgIdPackageContentUploadFromUri === 'function');
|
|
2567
|
+
done();
|
|
2568
|
+
} catch (error) {
|
|
2569
|
+
log.error(`Test Failure: ${error}`);
|
|
2570
|
+
done(error);
|
|
2571
|
+
}
|
|
2572
|
+
}).timeout(attemptTimeout);
|
|
2573
|
+
it('should error if - missing vnfPkgId', (done) => {
|
|
2574
|
+
try {
|
|
2575
|
+
a.postVnfPackagesVnfPkgIdPackageContentUploadFromUri(null, null, (data, error) => {
|
|
2576
|
+
try {
|
|
2577
|
+
const displayE = 'vnfPkgId is required';
|
|
2578
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-postVnfPackagesVnfPkgIdPackageContentUploadFromUri', displayE);
|
|
2579
|
+
done();
|
|
2580
|
+
} catch (err) {
|
|
2581
|
+
log.error(`Test Failure: ${err}`);
|
|
2582
|
+
done(err);
|
|
2583
|
+
}
|
|
2584
|
+
});
|
|
2585
|
+
} catch (error) {
|
|
2586
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2587
|
+
done(error);
|
|
2588
|
+
}
|
|
2589
|
+
}).timeout(attemptTimeout);
|
|
2590
|
+
it('should error if - missing body', (done) => {
|
|
2591
|
+
try {
|
|
2592
|
+
a.postVnfPackagesVnfPkgIdPackageContentUploadFromUri('fakeparam', null, (data, error) => {
|
|
2593
|
+
try {
|
|
2594
|
+
const displayE = 'body is required';
|
|
2595
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-postVnfPackagesVnfPkgIdPackageContentUploadFromUri', displayE);
|
|
2596
|
+
done();
|
|
2597
|
+
} catch (err) {
|
|
2598
|
+
log.error(`Test Failure: ${err}`);
|
|
2599
|
+
done(err);
|
|
2600
|
+
}
|
|
2601
|
+
});
|
|
2602
|
+
} catch (error) {
|
|
2603
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2604
|
+
done(error);
|
|
2605
|
+
}
|
|
2606
|
+
}).timeout(attemptTimeout);
|
|
2607
|
+
});
|
|
2608
|
+
|
|
2609
|
+
describe('#getVnfPackagesVnfPkgIdArtifactsArtifactPath - errors', () => {
|
|
2610
|
+
it('should have a getVnfPackagesVnfPkgIdArtifactsArtifactPath function', (done) => {
|
|
2611
|
+
try {
|
|
2612
|
+
assert.equal(true, typeof a.getVnfPackagesVnfPkgIdArtifactsArtifactPath === 'function');
|
|
2613
|
+
done();
|
|
2614
|
+
} catch (error) {
|
|
2615
|
+
log.error(`Test Failure: ${error}`);
|
|
2616
|
+
done(error);
|
|
2617
|
+
}
|
|
2618
|
+
}).timeout(attemptTimeout);
|
|
2619
|
+
it('should error if - missing vnfPkgId', (done) => {
|
|
2620
|
+
try {
|
|
2621
|
+
a.getVnfPackagesVnfPkgIdArtifactsArtifactPath(null, null, null, (data, error) => {
|
|
2622
|
+
try {
|
|
2623
|
+
const displayE = 'vnfPkgId is required';
|
|
2624
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-getVnfPackagesVnfPkgIdArtifactsArtifactPath', displayE);
|
|
2625
|
+
done();
|
|
2626
|
+
} catch (err) {
|
|
2627
|
+
log.error(`Test Failure: ${err}`);
|
|
2628
|
+
done(err);
|
|
2629
|
+
}
|
|
2630
|
+
});
|
|
2631
|
+
} catch (error) {
|
|
2632
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2633
|
+
done(error);
|
|
2634
|
+
}
|
|
2635
|
+
}).timeout(attemptTimeout);
|
|
2636
|
+
it('should error if - missing artifactPath', (done) => {
|
|
2637
|
+
try {
|
|
2638
|
+
a.getVnfPackagesVnfPkgIdArtifactsArtifactPath('fakeparam', null, null, (data, error) => {
|
|
2639
|
+
try {
|
|
2640
|
+
const displayE = 'artifactPath is required';
|
|
2641
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-getVnfPackagesVnfPkgIdArtifactsArtifactPath', displayE);
|
|
2642
|
+
done();
|
|
2643
|
+
} catch (err) {
|
|
2644
|
+
log.error(`Test Failure: ${err}`);
|
|
2645
|
+
done(err);
|
|
2646
|
+
}
|
|
2647
|
+
});
|
|
2648
|
+
} catch (error) {
|
|
2649
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2650
|
+
done(error);
|
|
2651
|
+
}
|
|
2652
|
+
}).timeout(attemptTimeout);
|
|
2653
|
+
});
|
|
2654
|
+
|
|
2655
|
+
describe('#postPmJobs - errors', () => {
|
|
2656
|
+
it('should have a postPmJobs function', (done) => {
|
|
2657
|
+
try {
|
|
2658
|
+
assert.equal(true, typeof a.postPmJobs === 'function');
|
|
2659
|
+
done();
|
|
2660
|
+
} catch (error) {
|
|
2661
|
+
log.error(`Test Failure: ${error}`);
|
|
2662
|
+
done(error);
|
|
2663
|
+
}
|
|
2664
|
+
}).timeout(attemptTimeout);
|
|
2665
|
+
it('should error if - missing body', (done) => {
|
|
2666
|
+
try {
|
|
2667
|
+
a.postPmJobs(null, (data, error) => {
|
|
2668
|
+
try {
|
|
2669
|
+
const displayE = 'body is required';
|
|
2670
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-postPmJobs', displayE);
|
|
2671
|
+
done();
|
|
2672
|
+
} catch (err) {
|
|
2673
|
+
log.error(`Test Failure: ${err}`);
|
|
2674
|
+
done(err);
|
|
2675
|
+
}
|
|
2676
|
+
});
|
|
2677
|
+
} catch (error) {
|
|
2678
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2679
|
+
done(error);
|
|
2680
|
+
}
|
|
2681
|
+
}).timeout(attemptTimeout);
|
|
2682
|
+
});
|
|
2683
|
+
|
|
2684
|
+
describe('#getPmJobs - errors', () => {
|
|
2685
|
+
it('should have a getPmJobs function', (done) => {
|
|
2686
|
+
try {
|
|
2687
|
+
assert.equal(true, typeof a.getPmJobs === 'function');
|
|
2688
|
+
done();
|
|
2689
|
+
} catch (error) {
|
|
2690
|
+
log.error(`Test Failure: ${error}`);
|
|
2691
|
+
done(error);
|
|
2692
|
+
}
|
|
2693
|
+
}).timeout(attemptTimeout);
|
|
2694
|
+
});
|
|
2695
|
+
|
|
2696
|
+
describe('#getPmJobsPmJobId - errors', () => {
|
|
2697
|
+
it('should have a getPmJobsPmJobId function', (done) => {
|
|
2698
|
+
try {
|
|
2699
|
+
assert.equal(true, typeof a.getPmJobsPmJobId === 'function');
|
|
2700
|
+
done();
|
|
2701
|
+
} catch (error) {
|
|
2702
|
+
log.error(`Test Failure: ${error}`);
|
|
2703
|
+
done(error);
|
|
2704
|
+
}
|
|
2705
|
+
}).timeout(attemptTimeout);
|
|
2706
|
+
it('should error if - missing pmJobId', (done) => {
|
|
2707
|
+
try {
|
|
2708
|
+
a.getPmJobsPmJobId(null, (data, error) => {
|
|
2709
|
+
try {
|
|
2710
|
+
const displayE = 'pmJobId is required';
|
|
2711
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-getPmJobsPmJobId', displayE);
|
|
2712
|
+
done();
|
|
2713
|
+
} catch (err) {
|
|
2714
|
+
log.error(`Test Failure: ${err}`);
|
|
2715
|
+
done(err);
|
|
2716
|
+
}
|
|
2717
|
+
});
|
|
2718
|
+
} catch (error) {
|
|
2719
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2720
|
+
done(error);
|
|
2721
|
+
}
|
|
2722
|
+
}).timeout(attemptTimeout);
|
|
2723
|
+
});
|
|
2724
|
+
|
|
2725
|
+
describe('#patchPmJobsPmJobId - errors', () => {
|
|
2726
|
+
it('should have a patchPmJobsPmJobId function', (done) => {
|
|
2727
|
+
try {
|
|
2728
|
+
assert.equal(true, typeof a.patchPmJobsPmJobId === 'function');
|
|
2729
|
+
done();
|
|
2730
|
+
} catch (error) {
|
|
2731
|
+
log.error(`Test Failure: ${error}`);
|
|
2732
|
+
done(error);
|
|
2733
|
+
}
|
|
2734
|
+
}).timeout(attemptTimeout);
|
|
2735
|
+
it('should error if - missing pmJobId', (done) => {
|
|
2736
|
+
try {
|
|
2737
|
+
a.patchPmJobsPmJobId(null, null, (data, error) => {
|
|
2738
|
+
try {
|
|
2739
|
+
const displayE = 'pmJobId is required';
|
|
2740
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-patchPmJobsPmJobId', displayE);
|
|
2741
|
+
done();
|
|
2742
|
+
} catch (err) {
|
|
2743
|
+
log.error(`Test Failure: ${err}`);
|
|
2744
|
+
done(err);
|
|
2745
|
+
}
|
|
2746
|
+
});
|
|
2747
|
+
} catch (error) {
|
|
2748
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2749
|
+
done(error);
|
|
2750
|
+
}
|
|
2751
|
+
}).timeout(attemptTimeout);
|
|
2752
|
+
it('should error if - missing body', (done) => {
|
|
2753
|
+
try {
|
|
2754
|
+
a.patchPmJobsPmJobId('fakeparam', null, (data, error) => {
|
|
2755
|
+
try {
|
|
2756
|
+
const displayE = 'body is required';
|
|
2757
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-patchPmJobsPmJobId', displayE);
|
|
2758
|
+
done();
|
|
2759
|
+
} catch (err) {
|
|
2760
|
+
log.error(`Test Failure: ${err}`);
|
|
2761
|
+
done(err);
|
|
2762
|
+
}
|
|
2763
|
+
});
|
|
2764
|
+
} catch (error) {
|
|
2765
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2766
|
+
done(error);
|
|
2767
|
+
}
|
|
2768
|
+
}).timeout(attemptTimeout);
|
|
2769
|
+
});
|
|
2770
|
+
|
|
2771
|
+
describe('#deletePmJobsPmJobId - errors', () => {
|
|
2772
|
+
it('should have a deletePmJobsPmJobId function', (done) => {
|
|
2773
|
+
try {
|
|
2774
|
+
assert.equal(true, typeof a.deletePmJobsPmJobId === 'function');
|
|
2775
|
+
done();
|
|
2776
|
+
} catch (error) {
|
|
2777
|
+
log.error(`Test Failure: ${error}`);
|
|
2778
|
+
done(error);
|
|
2779
|
+
}
|
|
2780
|
+
}).timeout(attemptTimeout);
|
|
2781
|
+
it('should error if - missing pmJobId', (done) => {
|
|
2782
|
+
try {
|
|
2783
|
+
a.deletePmJobsPmJobId(null, (data, error) => {
|
|
2784
|
+
try {
|
|
2785
|
+
const displayE = 'pmJobId is required';
|
|
2786
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-deletePmJobsPmJobId', displayE);
|
|
2787
|
+
done();
|
|
2788
|
+
} catch (err) {
|
|
2789
|
+
log.error(`Test Failure: ${err}`);
|
|
2790
|
+
done(err);
|
|
2791
|
+
}
|
|
2792
|
+
});
|
|
2793
|
+
} catch (error) {
|
|
2794
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2795
|
+
done(error);
|
|
2796
|
+
}
|
|
2797
|
+
}).timeout(attemptTimeout);
|
|
2798
|
+
});
|
|
2799
|
+
|
|
2800
|
+
describe('#getPmJobsPmJobIdReportsReportId - errors', () => {
|
|
2801
|
+
it('should have a getPmJobsPmJobIdReportsReportId function', (done) => {
|
|
2802
|
+
try {
|
|
2803
|
+
assert.equal(true, typeof a.getPmJobsPmJobIdReportsReportId === 'function');
|
|
2804
|
+
done();
|
|
2805
|
+
} catch (error) {
|
|
2806
|
+
log.error(`Test Failure: ${error}`);
|
|
2807
|
+
done(error);
|
|
2808
|
+
}
|
|
2809
|
+
}).timeout(attemptTimeout);
|
|
2810
|
+
it('should error if - missing pmJobId', (done) => {
|
|
2811
|
+
try {
|
|
2812
|
+
a.getPmJobsPmJobIdReportsReportId(null, null, (data, error) => {
|
|
2813
|
+
try {
|
|
2814
|
+
const displayE = 'pmJobId is required';
|
|
2815
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-getPmJobsPmJobIdReportsReportId', displayE);
|
|
2816
|
+
done();
|
|
2817
|
+
} catch (err) {
|
|
2818
|
+
log.error(`Test Failure: ${err}`);
|
|
2819
|
+
done(err);
|
|
2820
|
+
}
|
|
2821
|
+
});
|
|
2822
|
+
} catch (error) {
|
|
2823
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2824
|
+
done(error);
|
|
2825
|
+
}
|
|
2826
|
+
}).timeout(attemptTimeout);
|
|
2827
|
+
it('should error if - missing reportId', (done) => {
|
|
2828
|
+
try {
|
|
2829
|
+
a.getPmJobsPmJobIdReportsReportId('fakeparam', null, (data, error) => {
|
|
2830
|
+
try {
|
|
2831
|
+
const displayE = 'reportId is required';
|
|
2832
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-getPmJobsPmJobIdReportsReportId', displayE);
|
|
2833
|
+
done();
|
|
2834
|
+
} catch (err) {
|
|
2835
|
+
log.error(`Test Failure: ${err}`);
|
|
2836
|
+
done(err);
|
|
2837
|
+
}
|
|
2838
|
+
});
|
|
2839
|
+
} catch (error) {
|
|
2840
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2841
|
+
done(error);
|
|
2842
|
+
}
|
|
2843
|
+
}).timeout(attemptTimeout);
|
|
2844
|
+
});
|
|
2845
|
+
|
|
2846
|
+
describe('#postThresholds - errors', () => {
|
|
2847
|
+
it('should have a postThresholds function', (done) => {
|
|
2848
|
+
try {
|
|
2849
|
+
assert.equal(true, typeof a.postThresholds === 'function');
|
|
2850
|
+
done();
|
|
2851
|
+
} catch (error) {
|
|
2852
|
+
log.error(`Test Failure: ${error}`);
|
|
2853
|
+
done(error);
|
|
2854
|
+
}
|
|
2855
|
+
}).timeout(attemptTimeout);
|
|
2856
|
+
it('should error if - missing body', (done) => {
|
|
2857
|
+
try {
|
|
2858
|
+
a.postThresholds(null, (data, error) => {
|
|
2859
|
+
try {
|
|
2860
|
+
const displayE = 'body is required';
|
|
2861
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-postThresholds', displayE);
|
|
2862
|
+
done();
|
|
2863
|
+
} catch (err) {
|
|
2864
|
+
log.error(`Test Failure: ${err}`);
|
|
2865
|
+
done(err);
|
|
2866
|
+
}
|
|
2867
|
+
});
|
|
2868
|
+
} catch (error) {
|
|
2869
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2870
|
+
done(error);
|
|
2871
|
+
}
|
|
2872
|
+
}).timeout(attemptTimeout);
|
|
2873
|
+
});
|
|
2874
|
+
|
|
2875
|
+
describe('#getThresholds - errors', () => {
|
|
2876
|
+
it('should have a getThresholds function', (done) => {
|
|
2877
|
+
try {
|
|
2878
|
+
assert.equal(true, typeof a.getThresholds === 'function');
|
|
2879
|
+
done();
|
|
2880
|
+
} catch (error) {
|
|
2881
|
+
log.error(`Test Failure: ${error}`);
|
|
2882
|
+
done(error);
|
|
2883
|
+
}
|
|
2884
|
+
}).timeout(attemptTimeout);
|
|
2885
|
+
});
|
|
2886
|
+
|
|
2887
|
+
describe('#getThresholdsThresholdId - errors', () => {
|
|
2888
|
+
it('should have a getThresholdsThresholdId function', (done) => {
|
|
2889
|
+
try {
|
|
2890
|
+
assert.equal(true, typeof a.getThresholdsThresholdId === 'function');
|
|
2891
|
+
done();
|
|
2892
|
+
} catch (error) {
|
|
2893
|
+
log.error(`Test Failure: ${error}`);
|
|
2894
|
+
done(error);
|
|
2895
|
+
}
|
|
2896
|
+
}).timeout(attemptTimeout);
|
|
2897
|
+
it('should error if - missing thresholdId', (done) => {
|
|
2898
|
+
try {
|
|
2899
|
+
a.getThresholdsThresholdId(null, (data, error) => {
|
|
2900
|
+
try {
|
|
2901
|
+
const displayE = 'thresholdId is required';
|
|
2902
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-getThresholdsThresholdId', displayE);
|
|
2903
|
+
done();
|
|
2904
|
+
} catch (err) {
|
|
2905
|
+
log.error(`Test Failure: ${err}`);
|
|
2906
|
+
done(err);
|
|
2907
|
+
}
|
|
2908
|
+
});
|
|
2909
|
+
} catch (error) {
|
|
2910
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2911
|
+
done(error);
|
|
2912
|
+
}
|
|
2913
|
+
}).timeout(attemptTimeout);
|
|
2914
|
+
});
|
|
2915
|
+
|
|
2916
|
+
describe('#patchThresholdsThresholdId - errors', () => {
|
|
2917
|
+
it('should have a patchThresholdsThresholdId function', (done) => {
|
|
2918
|
+
try {
|
|
2919
|
+
assert.equal(true, typeof a.patchThresholdsThresholdId === 'function');
|
|
2920
|
+
done();
|
|
2921
|
+
} catch (error) {
|
|
2922
|
+
log.error(`Test Failure: ${error}`);
|
|
2923
|
+
done(error);
|
|
2924
|
+
}
|
|
2925
|
+
}).timeout(attemptTimeout);
|
|
2926
|
+
it('should error if - missing thresholdId', (done) => {
|
|
2927
|
+
try {
|
|
2928
|
+
a.patchThresholdsThresholdId(null, null, (data, error) => {
|
|
2929
|
+
try {
|
|
2930
|
+
const displayE = 'thresholdId is required';
|
|
2931
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-patchThresholdsThresholdId', displayE);
|
|
2932
|
+
done();
|
|
2933
|
+
} catch (err) {
|
|
2934
|
+
log.error(`Test Failure: ${err}`);
|
|
2935
|
+
done(err);
|
|
2936
|
+
}
|
|
2937
|
+
});
|
|
2938
|
+
} catch (error) {
|
|
2939
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2940
|
+
done(error);
|
|
2941
|
+
}
|
|
2942
|
+
}).timeout(attemptTimeout);
|
|
2943
|
+
it('should error if - missing body', (done) => {
|
|
2944
|
+
try {
|
|
2945
|
+
a.patchThresholdsThresholdId('fakeparam', null, (data, error) => {
|
|
2946
|
+
try {
|
|
2947
|
+
const displayE = 'body is required';
|
|
2948
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-patchThresholdsThresholdId', displayE);
|
|
2949
|
+
done();
|
|
2950
|
+
} catch (err) {
|
|
2951
|
+
log.error(`Test Failure: ${err}`);
|
|
2952
|
+
done(err);
|
|
2953
|
+
}
|
|
2954
|
+
});
|
|
2955
|
+
} catch (error) {
|
|
2956
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2957
|
+
done(error);
|
|
2958
|
+
}
|
|
2959
|
+
}).timeout(attemptTimeout);
|
|
2960
|
+
});
|
|
2961
|
+
|
|
2962
|
+
describe('#deleteThresholdsThresholdId - errors', () => {
|
|
2963
|
+
it('should have a deleteThresholdsThresholdId function', (done) => {
|
|
2964
|
+
try {
|
|
2965
|
+
assert.equal(true, typeof a.deleteThresholdsThresholdId === 'function');
|
|
2966
|
+
done();
|
|
2967
|
+
} catch (error) {
|
|
2968
|
+
log.error(`Test Failure: ${error}`);
|
|
2969
|
+
done(error);
|
|
2970
|
+
}
|
|
2971
|
+
}).timeout(attemptTimeout);
|
|
2972
|
+
it('should error if - missing thresholdId', (done) => {
|
|
2973
|
+
try {
|
|
2974
|
+
a.deleteThresholdsThresholdId(null, (data, error) => {
|
|
2975
|
+
try {
|
|
2976
|
+
const displayE = 'thresholdId is required';
|
|
2977
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-deleteThresholdsThresholdId', displayE);
|
|
2978
|
+
done();
|
|
2979
|
+
} catch (err) {
|
|
2980
|
+
log.error(`Test Failure: ${err}`);
|
|
2981
|
+
done(err);
|
|
2982
|
+
}
|
|
2983
|
+
});
|
|
2984
|
+
} catch (error) {
|
|
2985
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2986
|
+
done(error);
|
|
2987
|
+
}
|
|
2988
|
+
}).timeout(attemptTimeout);
|
|
2989
|
+
});
|
|
2990
|
+
|
|
2991
|
+
describe('#getNfviCapacityInfos - errors', () => {
|
|
2992
|
+
it('should have a getNfviCapacityInfos function', (done) => {
|
|
2993
|
+
try {
|
|
2994
|
+
assert.equal(true, typeof a.getNfviCapacityInfos === 'function');
|
|
2995
|
+
done();
|
|
2996
|
+
} catch (error) {
|
|
2997
|
+
log.error(`Test Failure: ${error}`);
|
|
2998
|
+
done(error);
|
|
2999
|
+
}
|
|
3000
|
+
}).timeout(attemptTimeout);
|
|
3001
|
+
});
|
|
3002
|
+
|
|
3003
|
+
describe('#getNfviCapacityInfosVimId - errors', () => {
|
|
3004
|
+
it('should have a getNfviCapacityInfosVimId function', (done) => {
|
|
3005
|
+
try {
|
|
3006
|
+
assert.equal(true, typeof a.getNfviCapacityInfosVimId === 'function');
|
|
3007
|
+
done();
|
|
3008
|
+
} catch (error) {
|
|
3009
|
+
log.error(`Test Failure: ${error}`);
|
|
3010
|
+
done(error);
|
|
3011
|
+
}
|
|
3012
|
+
}).timeout(attemptTimeout);
|
|
3013
|
+
it('should error if - missing vimId', (done) => {
|
|
3014
|
+
try {
|
|
3015
|
+
a.getNfviCapacityInfosVimId(null, null, (data, error) => {
|
|
3016
|
+
try {
|
|
3017
|
+
const displayE = 'vimId is required';
|
|
3018
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-getNfviCapacityInfosVimId', displayE);
|
|
3019
|
+
done();
|
|
3020
|
+
} catch (err) {
|
|
3021
|
+
log.error(`Test Failure: ${err}`);
|
|
3022
|
+
done(err);
|
|
3023
|
+
}
|
|
3024
|
+
});
|
|
3025
|
+
} catch (error) {
|
|
3026
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3027
|
+
done(error);
|
|
3028
|
+
}
|
|
3029
|
+
}).timeout(attemptTimeout);
|
|
3030
|
+
});
|
|
3031
|
+
|
|
3032
|
+
describe('#getCapacityThresholds - errors', () => {
|
|
3033
|
+
it('should have a getCapacityThresholds function', (done) => {
|
|
3034
|
+
try {
|
|
3035
|
+
assert.equal(true, typeof a.getCapacityThresholds === 'function');
|
|
3036
|
+
done();
|
|
3037
|
+
} catch (error) {
|
|
3038
|
+
log.error(`Test Failure: ${error}`);
|
|
3039
|
+
done(error);
|
|
3040
|
+
}
|
|
3041
|
+
}).timeout(attemptTimeout);
|
|
3042
|
+
});
|
|
3043
|
+
|
|
3044
|
+
describe('#postCapacityThresholds - errors', () => {
|
|
3045
|
+
it('should have a postCapacityThresholds function', (done) => {
|
|
3046
|
+
try {
|
|
3047
|
+
assert.equal(true, typeof a.postCapacityThresholds === 'function');
|
|
3048
|
+
done();
|
|
3049
|
+
} catch (error) {
|
|
3050
|
+
log.error(`Test Failure: ${error}`);
|
|
3051
|
+
done(error);
|
|
3052
|
+
}
|
|
3053
|
+
}).timeout(attemptTimeout);
|
|
3054
|
+
it('should error if - missing body', (done) => {
|
|
3055
|
+
try {
|
|
3056
|
+
a.postCapacityThresholds(null, (data, error) => {
|
|
3057
|
+
try {
|
|
3058
|
+
const displayE = 'body is required';
|
|
3059
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-postCapacityThresholds', displayE);
|
|
3060
|
+
done();
|
|
3061
|
+
} catch (err) {
|
|
3062
|
+
log.error(`Test Failure: ${err}`);
|
|
3063
|
+
done(err);
|
|
3064
|
+
}
|
|
3065
|
+
});
|
|
3066
|
+
} catch (error) {
|
|
3067
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3068
|
+
done(error);
|
|
3069
|
+
}
|
|
3070
|
+
}).timeout(attemptTimeout);
|
|
3071
|
+
});
|
|
3072
|
+
|
|
3073
|
+
describe('#getCapacityThresholdsCapacityThresholdId - errors', () => {
|
|
3074
|
+
it('should have a getCapacityThresholdsCapacityThresholdId function', (done) => {
|
|
3075
|
+
try {
|
|
3076
|
+
assert.equal(true, typeof a.getCapacityThresholdsCapacityThresholdId === 'function');
|
|
3077
|
+
done();
|
|
3078
|
+
} catch (error) {
|
|
3079
|
+
log.error(`Test Failure: ${error}`);
|
|
3080
|
+
done(error);
|
|
3081
|
+
}
|
|
3082
|
+
}).timeout(attemptTimeout);
|
|
3083
|
+
it('should error if - missing capacityThresholdId', (done) => {
|
|
3084
|
+
try {
|
|
3085
|
+
a.getCapacityThresholdsCapacityThresholdId(null, (data, error) => {
|
|
3086
|
+
try {
|
|
3087
|
+
const displayE = 'capacityThresholdId is required';
|
|
3088
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-getCapacityThresholdsCapacityThresholdId', displayE);
|
|
3089
|
+
done();
|
|
3090
|
+
} catch (err) {
|
|
3091
|
+
log.error(`Test Failure: ${err}`);
|
|
3092
|
+
done(err);
|
|
3093
|
+
}
|
|
3094
|
+
});
|
|
3095
|
+
} catch (error) {
|
|
3096
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3097
|
+
done(error);
|
|
3098
|
+
}
|
|
3099
|
+
}).timeout(attemptTimeout);
|
|
3100
|
+
});
|
|
3101
|
+
|
|
3102
|
+
describe('#patchCapacityThresholdsCapacityThresholdId - errors', () => {
|
|
3103
|
+
it('should have a patchCapacityThresholdsCapacityThresholdId function', (done) => {
|
|
3104
|
+
try {
|
|
3105
|
+
assert.equal(true, typeof a.patchCapacityThresholdsCapacityThresholdId === 'function');
|
|
3106
|
+
done();
|
|
3107
|
+
} catch (error) {
|
|
3108
|
+
log.error(`Test Failure: ${error}`);
|
|
3109
|
+
done(error);
|
|
3110
|
+
}
|
|
3111
|
+
}).timeout(attemptTimeout);
|
|
3112
|
+
it('should error if - missing capacityThresholdId', (done) => {
|
|
3113
|
+
try {
|
|
3114
|
+
a.patchCapacityThresholdsCapacityThresholdId(null, null, (data, error) => {
|
|
3115
|
+
try {
|
|
3116
|
+
const displayE = 'capacityThresholdId is required';
|
|
3117
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-patchCapacityThresholdsCapacityThresholdId', displayE);
|
|
3118
|
+
done();
|
|
3119
|
+
} catch (err) {
|
|
3120
|
+
log.error(`Test Failure: ${err}`);
|
|
3121
|
+
done(err);
|
|
3122
|
+
}
|
|
3123
|
+
});
|
|
3124
|
+
} catch (error) {
|
|
3125
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3126
|
+
done(error);
|
|
3127
|
+
}
|
|
3128
|
+
}).timeout(attemptTimeout);
|
|
3129
|
+
it('should error if - missing body', (done) => {
|
|
3130
|
+
try {
|
|
3131
|
+
a.patchCapacityThresholdsCapacityThresholdId('fakeparam', null, (data, error) => {
|
|
3132
|
+
try {
|
|
3133
|
+
const displayE = 'body is required';
|
|
3134
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-patchCapacityThresholdsCapacityThresholdId', displayE);
|
|
3135
|
+
done();
|
|
3136
|
+
} catch (err) {
|
|
3137
|
+
log.error(`Test Failure: ${err}`);
|
|
3138
|
+
done(err);
|
|
3139
|
+
}
|
|
3140
|
+
});
|
|
3141
|
+
} catch (error) {
|
|
3142
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3143
|
+
done(error);
|
|
3144
|
+
}
|
|
3145
|
+
}).timeout(attemptTimeout);
|
|
3146
|
+
});
|
|
3147
|
+
|
|
3148
|
+
describe('#deleteCapacityThresholdsCapacityThresholdId - errors', () => {
|
|
3149
|
+
it('should have a deleteCapacityThresholdsCapacityThresholdId function', (done) => {
|
|
3150
|
+
try {
|
|
3151
|
+
assert.equal(true, typeof a.deleteCapacityThresholdsCapacityThresholdId === 'function');
|
|
3152
|
+
done();
|
|
3153
|
+
} catch (error) {
|
|
3154
|
+
log.error(`Test Failure: ${error}`);
|
|
3155
|
+
done(error);
|
|
3156
|
+
}
|
|
3157
|
+
}).timeout(attemptTimeout);
|
|
3158
|
+
it('should error if - missing capacityThresholdId', (done) => {
|
|
3159
|
+
try {
|
|
3160
|
+
a.deleteCapacityThresholdsCapacityThresholdId(null, (data, error) => {
|
|
3161
|
+
try {
|
|
3162
|
+
const displayE = 'capacityThresholdId is required';
|
|
3163
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-deleteCapacityThresholdsCapacityThresholdId', displayE);
|
|
3164
|
+
done();
|
|
3165
|
+
} catch (err) {
|
|
3166
|
+
log.error(`Test Failure: ${err}`);
|
|
3167
|
+
done(err);
|
|
3168
|
+
}
|
|
3169
|
+
});
|
|
3170
|
+
} catch (error) {
|
|
3171
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3172
|
+
done(error);
|
|
3173
|
+
}
|
|
3174
|
+
}).timeout(attemptTimeout);
|
|
3175
|
+
});
|
|
3176
|
+
|
|
3177
|
+
describe('#postVnfSnapshotPackages - errors', () => {
|
|
3178
|
+
it('should have a postVnfSnapshotPackages function', (done) => {
|
|
3179
|
+
try {
|
|
3180
|
+
assert.equal(true, typeof a.postVnfSnapshotPackages === 'function');
|
|
3181
|
+
done();
|
|
3182
|
+
} catch (error) {
|
|
3183
|
+
log.error(`Test Failure: ${error}`);
|
|
3184
|
+
done(error);
|
|
3185
|
+
}
|
|
3186
|
+
}).timeout(attemptTimeout);
|
|
3187
|
+
it('should error if - missing body', (done) => {
|
|
3188
|
+
try {
|
|
3189
|
+
a.postVnfSnapshotPackages(null, (data, error) => {
|
|
3190
|
+
try {
|
|
3191
|
+
const displayE = 'body is required';
|
|
3192
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-postVnfSnapshotPackages', displayE);
|
|
3193
|
+
done();
|
|
3194
|
+
} catch (err) {
|
|
3195
|
+
log.error(`Test Failure: ${err}`);
|
|
3196
|
+
done(err);
|
|
3197
|
+
}
|
|
3198
|
+
});
|
|
3199
|
+
} catch (error) {
|
|
3200
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3201
|
+
done(error);
|
|
3202
|
+
}
|
|
3203
|
+
}).timeout(attemptTimeout);
|
|
3204
|
+
});
|
|
3205
|
+
|
|
3206
|
+
describe('#getVnfSnapshotPackages - errors', () => {
|
|
3207
|
+
it('should have a getVnfSnapshotPackages function', (done) => {
|
|
3208
|
+
try {
|
|
3209
|
+
assert.equal(true, typeof a.getVnfSnapshotPackages === 'function');
|
|
3210
|
+
done();
|
|
3211
|
+
} catch (error) {
|
|
3212
|
+
log.error(`Test Failure: ${error}`);
|
|
3213
|
+
done(error);
|
|
3214
|
+
}
|
|
3215
|
+
}).timeout(attemptTimeout);
|
|
3216
|
+
});
|
|
3217
|
+
|
|
3218
|
+
describe('#getVnfSnapshotPackagesVnfSnapshotPkgId - errors', () => {
|
|
3219
|
+
it('should have a getVnfSnapshotPackagesVnfSnapshotPkgId function', (done) => {
|
|
3220
|
+
try {
|
|
3221
|
+
assert.equal(true, typeof a.getVnfSnapshotPackagesVnfSnapshotPkgId === 'function');
|
|
3222
|
+
done();
|
|
3223
|
+
} catch (error) {
|
|
3224
|
+
log.error(`Test Failure: ${error}`);
|
|
3225
|
+
done(error);
|
|
3226
|
+
}
|
|
3227
|
+
}).timeout(attemptTimeout);
|
|
3228
|
+
it('should error if - missing vnfSnapshotPkgId', (done) => {
|
|
3229
|
+
try {
|
|
3230
|
+
a.getVnfSnapshotPackagesVnfSnapshotPkgId(null, (data, error) => {
|
|
3231
|
+
try {
|
|
3232
|
+
const displayE = 'vnfSnapshotPkgId is required';
|
|
3233
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-getVnfSnapshotPackagesVnfSnapshotPkgId', displayE);
|
|
3234
|
+
done();
|
|
3235
|
+
} catch (err) {
|
|
3236
|
+
log.error(`Test Failure: ${err}`);
|
|
3237
|
+
done(err);
|
|
3238
|
+
}
|
|
3239
|
+
});
|
|
3240
|
+
} catch (error) {
|
|
3241
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3242
|
+
done(error);
|
|
3243
|
+
}
|
|
3244
|
+
}).timeout(attemptTimeout);
|
|
3245
|
+
});
|
|
3246
|
+
|
|
3247
|
+
describe('#patchVnfSnapshotPackagesVnfSnapshotPkgId - errors', () => {
|
|
3248
|
+
it('should have a patchVnfSnapshotPackagesVnfSnapshotPkgId function', (done) => {
|
|
3249
|
+
try {
|
|
3250
|
+
assert.equal(true, typeof a.patchVnfSnapshotPackagesVnfSnapshotPkgId === 'function');
|
|
3251
|
+
done();
|
|
3252
|
+
} catch (error) {
|
|
3253
|
+
log.error(`Test Failure: ${error}`);
|
|
3254
|
+
done(error);
|
|
3255
|
+
}
|
|
3256
|
+
}).timeout(attemptTimeout);
|
|
3257
|
+
it('should error if - missing vnfSnapshotPkgId', (done) => {
|
|
3258
|
+
try {
|
|
3259
|
+
a.patchVnfSnapshotPackagesVnfSnapshotPkgId(null, null, (data, error) => {
|
|
3260
|
+
try {
|
|
3261
|
+
const displayE = 'vnfSnapshotPkgId is required';
|
|
3262
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-patchVnfSnapshotPackagesVnfSnapshotPkgId', displayE);
|
|
3263
|
+
done();
|
|
3264
|
+
} catch (err) {
|
|
3265
|
+
log.error(`Test Failure: ${err}`);
|
|
3266
|
+
done(err);
|
|
3267
|
+
}
|
|
3268
|
+
});
|
|
3269
|
+
} catch (error) {
|
|
3270
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3271
|
+
done(error);
|
|
3272
|
+
}
|
|
3273
|
+
}).timeout(attemptTimeout);
|
|
3274
|
+
it('should error if - missing body', (done) => {
|
|
3275
|
+
try {
|
|
3276
|
+
a.patchVnfSnapshotPackagesVnfSnapshotPkgId('fakeparam', null, (data, error) => {
|
|
3277
|
+
try {
|
|
3278
|
+
const displayE = 'body is required';
|
|
3279
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-patchVnfSnapshotPackagesVnfSnapshotPkgId', displayE);
|
|
3280
|
+
done();
|
|
3281
|
+
} catch (err) {
|
|
3282
|
+
log.error(`Test Failure: ${err}`);
|
|
3283
|
+
done(err);
|
|
3284
|
+
}
|
|
3285
|
+
});
|
|
3286
|
+
} catch (error) {
|
|
3287
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3288
|
+
done(error);
|
|
3289
|
+
}
|
|
3290
|
+
}).timeout(attemptTimeout);
|
|
3291
|
+
});
|
|
3292
|
+
|
|
3293
|
+
describe('#deleteVnfSnapshotPackagesVnfSnapshotPkgId - errors', () => {
|
|
3294
|
+
it('should have a deleteVnfSnapshotPackagesVnfSnapshotPkgId function', (done) => {
|
|
3295
|
+
try {
|
|
3296
|
+
assert.equal(true, typeof a.deleteVnfSnapshotPackagesVnfSnapshotPkgId === 'function');
|
|
3297
|
+
done();
|
|
3298
|
+
} catch (error) {
|
|
3299
|
+
log.error(`Test Failure: ${error}`);
|
|
3300
|
+
done(error);
|
|
3301
|
+
}
|
|
3302
|
+
}).timeout(attemptTimeout);
|
|
3303
|
+
it('should error if - missing vnfSnapshotPkgId', (done) => {
|
|
3304
|
+
try {
|
|
3305
|
+
a.deleteVnfSnapshotPackagesVnfSnapshotPkgId(null, (data, error) => {
|
|
3306
|
+
try {
|
|
3307
|
+
const displayE = 'vnfSnapshotPkgId is required';
|
|
3308
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-deleteVnfSnapshotPackagesVnfSnapshotPkgId', displayE);
|
|
3309
|
+
done();
|
|
3310
|
+
} catch (err) {
|
|
3311
|
+
log.error(`Test Failure: ${err}`);
|
|
3312
|
+
done(err);
|
|
3313
|
+
}
|
|
3314
|
+
});
|
|
3315
|
+
} catch (error) {
|
|
3316
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3317
|
+
done(error);
|
|
3318
|
+
}
|
|
3319
|
+
}).timeout(attemptTimeout);
|
|
3320
|
+
});
|
|
3321
|
+
|
|
3322
|
+
describe('#getVnfSnapshotPackagesVnfSnapshotPkgIdPackageContent - errors', () => {
|
|
3323
|
+
it('should have a getVnfSnapshotPackagesVnfSnapshotPkgIdPackageContent function', (done) => {
|
|
3324
|
+
try {
|
|
3325
|
+
assert.equal(true, typeof a.getVnfSnapshotPackagesVnfSnapshotPkgIdPackageContent === 'function');
|
|
3326
|
+
done();
|
|
3327
|
+
} catch (error) {
|
|
3328
|
+
log.error(`Test Failure: ${error}`);
|
|
3329
|
+
done(error);
|
|
3330
|
+
}
|
|
3331
|
+
}).timeout(attemptTimeout);
|
|
3332
|
+
it('should error if - missing vnfSnapshotPkgId', (done) => {
|
|
3333
|
+
try {
|
|
3334
|
+
a.getVnfSnapshotPackagesVnfSnapshotPkgIdPackageContent(null, (data, error) => {
|
|
3335
|
+
try {
|
|
3336
|
+
const displayE = 'vnfSnapshotPkgId is required';
|
|
3337
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-getVnfSnapshotPackagesVnfSnapshotPkgIdPackageContent', displayE);
|
|
3338
|
+
done();
|
|
3339
|
+
} catch (err) {
|
|
3340
|
+
log.error(`Test Failure: ${err}`);
|
|
3341
|
+
done(err);
|
|
3342
|
+
}
|
|
3343
|
+
});
|
|
3344
|
+
} catch (error) {
|
|
3345
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3346
|
+
done(error);
|
|
3347
|
+
}
|
|
3348
|
+
}).timeout(attemptTimeout);
|
|
3349
|
+
});
|
|
3350
|
+
|
|
3351
|
+
describe('#putVnfSnapshotPackagesVnfSnapshotPkgIdPackageContent - errors', () => {
|
|
3352
|
+
it('should have a putVnfSnapshotPackagesVnfSnapshotPkgIdPackageContent function', (done) => {
|
|
3353
|
+
try {
|
|
3354
|
+
assert.equal(true, typeof a.putVnfSnapshotPackagesVnfSnapshotPkgIdPackageContent === 'function');
|
|
3355
|
+
done();
|
|
3356
|
+
} catch (error) {
|
|
3357
|
+
log.error(`Test Failure: ${error}`);
|
|
3358
|
+
done(error);
|
|
3359
|
+
}
|
|
3360
|
+
}).timeout(attemptTimeout);
|
|
3361
|
+
it('should error if - missing vnfSnapshotPkgId', (done) => {
|
|
3362
|
+
try {
|
|
3363
|
+
a.putVnfSnapshotPackagesVnfSnapshotPkgIdPackageContent(null, (data, error) => {
|
|
3364
|
+
try {
|
|
3365
|
+
const displayE = 'vnfSnapshotPkgId is required';
|
|
3366
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-putVnfSnapshotPackagesVnfSnapshotPkgIdPackageContent', displayE);
|
|
3367
|
+
done();
|
|
3368
|
+
} catch (err) {
|
|
3369
|
+
log.error(`Test Failure: ${err}`);
|
|
3370
|
+
done(err);
|
|
3371
|
+
}
|
|
3372
|
+
});
|
|
3373
|
+
} catch (error) {
|
|
3374
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3375
|
+
done(error);
|
|
3376
|
+
}
|
|
3377
|
+
}).timeout(attemptTimeout);
|
|
3378
|
+
});
|
|
3379
|
+
|
|
3380
|
+
describe('#postVnfSnapshotPackagesVnfSnapshotPkgIdPackageContentUploadFromUri - errors', () => {
|
|
3381
|
+
it('should have a postVnfSnapshotPackagesVnfSnapshotPkgIdPackageContentUploadFromUri function', (done) => {
|
|
3382
|
+
try {
|
|
3383
|
+
assert.equal(true, typeof a.postVnfSnapshotPackagesVnfSnapshotPkgIdPackageContentUploadFromUri === 'function');
|
|
3384
|
+
done();
|
|
3385
|
+
} catch (error) {
|
|
3386
|
+
log.error(`Test Failure: ${error}`);
|
|
3387
|
+
done(error);
|
|
3388
|
+
}
|
|
3389
|
+
}).timeout(attemptTimeout);
|
|
3390
|
+
it('should error if - missing vnfSnapshotPkgId', (done) => {
|
|
3391
|
+
try {
|
|
3392
|
+
a.postVnfSnapshotPackagesVnfSnapshotPkgIdPackageContentUploadFromUri(null, null, (data, error) => {
|
|
3393
|
+
try {
|
|
3394
|
+
const displayE = 'vnfSnapshotPkgId is required';
|
|
3395
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-postVnfSnapshotPackagesVnfSnapshotPkgIdPackageContentUploadFromUri', displayE);
|
|
3396
|
+
done();
|
|
3397
|
+
} catch (err) {
|
|
3398
|
+
log.error(`Test Failure: ${err}`);
|
|
3399
|
+
done(err);
|
|
3400
|
+
}
|
|
3401
|
+
});
|
|
3402
|
+
} catch (error) {
|
|
3403
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3404
|
+
done(error);
|
|
3405
|
+
}
|
|
3406
|
+
}).timeout(attemptTimeout);
|
|
3407
|
+
it('should error if - missing body', (done) => {
|
|
3408
|
+
try {
|
|
3409
|
+
a.postVnfSnapshotPackagesVnfSnapshotPkgIdPackageContentUploadFromUri('fakeparam', null, (data, error) => {
|
|
3410
|
+
try {
|
|
3411
|
+
const displayE = 'body is required';
|
|
3412
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-postVnfSnapshotPackagesVnfSnapshotPkgIdPackageContentUploadFromUri', displayE);
|
|
3413
|
+
done();
|
|
3414
|
+
} catch (err) {
|
|
3415
|
+
log.error(`Test Failure: ${err}`);
|
|
3416
|
+
done(err);
|
|
3417
|
+
}
|
|
3418
|
+
});
|
|
3419
|
+
} catch (error) {
|
|
3420
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3421
|
+
done(error);
|
|
3422
|
+
}
|
|
3423
|
+
}).timeout(attemptTimeout);
|
|
3424
|
+
});
|
|
3425
|
+
|
|
3426
|
+
describe('#postVnfSnapshotPackagesVnfSnapshotPkgIdPackageContentBuild - errors', () => {
|
|
3427
|
+
it('should have a postVnfSnapshotPackagesVnfSnapshotPkgIdPackageContentBuild function', (done) => {
|
|
3428
|
+
try {
|
|
3429
|
+
assert.equal(true, typeof a.postVnfSnapshotPackagesVnfSnapshotPkgIdPackageContentBuild === 'function');
|
|
3430
|
+
done();
|
|
3431
|
+
} catch (error) {
|
|
3432
|
+
log.error(`Test Failure: ${error}`);
|
|
3433
|
+
done(error);
|
|
3434
|
+
}
|
|
3435
|
+
}).timeout(attemptTimeout);
|
|
3436
|
+
it('should error if - missing vnfSnapshotPkgId', (done) => {
|
|
3437
|
+
try {
|
|
3438
|
+
a.postVnfSnapshotPackagesVnfSnapshotPkgIdPackageContentBuild(null, null, (data, error) => {
|
|
3439
|
+
try {
|
|
3440
|
+
const displayE = 'vnfSnapshotPkgId is required';
|
|
3441
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-postVnfSnapshotPackagesVnfSnapshotPkgIdPackageContentBuild', displayE);
|
|
3442
|
+
done();
|
|
3443
|
+
} catch (err) {
|
|
3444
|
+
log.error(`Test Failure: ${err}`);
|
|
3445
|
+
done(err);
|
|
3446
|
+
}
|
|
3447
|
+
});
|
|
3448
|
+
} catch (error) {
|
|
3449
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3450
|
+
done(error);
|
|
3451
|
+
}
|
|
3452
|
+
}).timeout(attemptTimeout);
|
|
3453
|
+
it('should error if - missing body', (done) => {
|
|
3454
|
+
try {
|
|
3455
|
+
a.postVnfSnapshotPackagesVnfSnapshotPkgIdPackageContentBuild('fakeparam', null, (data, error) => {
|
|
3456
|
+
try {
|
|
3457
|
+
const displayE = 'body is required';
|
|
3458
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-postVnfSnapshotPackagesVnfSnapshotPkgIdPackageContentBuild', displayE);
|
|
3459
|
+
done();
|
|
3460
|
+
} catch (err) {
|
|
3461
|
+
log.error(`Test Failure: ${err}`);
|
|
3462
|
+
done(err);
|
|
3463
|
+
}
|
|
3464
|
+
});
|
|
3465
|
+
} catch (error) {
|
|
3466
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3467
|
+
done(error);
|
|
3468
|
+
}
|
|
3469
|
+
}).timeout(attemptTimeout);
|
|
3470
|
+
});
|
|
3471
|
+
|
|
3472
|
+
describe('#postVnfSnapshotPackagesVnfSnapshotPkgIdPackageContentExtract - errors', () => {
|
|
3473
|
+
it('should have a postVnfSnapshotPackagesVnfSnapshotPkgIdPackageContentExtract function', (done) => {
|
|
3474
|
+
try {
|
|
3475
|
+
assert.equal(true, typeof a.postVnfSnapshotPackagesVnfSnapshotPkgIdPackageContentExtract === 'function');
|
|
3476
|
+
done();
|
|
3477
|
+
} catch (error) {
|
|
3478
|
+
log.error(`Test Failure: ${error}`);
|
|
3479
|
+
done(error);
|
|
3480
|
+
}
|
|
3481
|
+
}).timeout(attemptTimeout);
|
|
3482
|
+
it('should error if - missing vnfSnapshotPkgId', (done) => {
|
|
3483
|
+
try {
|
|
3484
|
+
a.postVnfSnapshotPackagesVnfSnapshotPkgIdPackageContentExtract(null, null, (data, error) => {
|
|
3485
|
+
try {
|
|
3486
|
+
const displayE = 'vnfSnapshotPkgId is required';
|
|
3487
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-postVnfSnapshotPackagesVnfSnapshotPkgIdPackageContentExtract', displayE);
|
|
3488
|
+
done();
|
|
3489
|
+
} catch (err) {
|
|
3490
|
+
log.error(`Test Failure: ${err}`);
|
|
3491
|
+
done(err);
|
|
3492
|
+
}
|
|
3493
|
+
});
|
|
3494
|
+
} catch (error) {
|
|
3495
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3496
|
+
done(error);
|
|
3497
|
+
}
|
|
3498
|
+
}).timeout(attemptTimeout);
|
|
3499
|
+
it('should error if - missing body', (done) => {
|
|
3500
|
+
try {
|
|
3501
|
+
a.postVnfSnapshotPackagesVnfSnapshotPkgIdPackageContentExtract('fakeparam', null, (data, error) => {
|
|
3502
|
+
try {
|
|
3503
|
+
const displayE = 'body is required';
|
|
3504
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-postVnfSnapshotPackagesVnfSnapshotPkgIdPackageContentExtract', displayE);
|
|
3505
|
+
done();
|
|
3506
|
+
} catch (err) {
|
|
3507
|
+
log.error(`Test Failure: ${err}`);
|
|
3508
|
+
done(err);
|
|
3509
|
+
}
|
|
3510
|
+
});
|
|
3511
|
+
} catch (error) {
|
|
3512
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3513
|
+
done(error);
|
|
3514
|
+
}
|
|
3515
|
+
}).timeout(attemptTimeout);
|
|
3516
|
+
});
|
|
3517
|
+
|
|
3518
|
+
describe('#postVnfSnapshotPackagesVnfSnapshotPkgIdPackageContentCancel - errors', () => {
|
|
3519
|
+
it('should have a postVnfSnapshotPackagesVnfSnapshotPkgIdPackageContentCancel function', (done) => {
|
|
3520
|
+
try {
|
|
3521
|
+
assert.equal(true, typeof a.postVnfSnapshotPackagesVnfSnapshotPkgIdPackageContentCancel === 'function');
|
|
3522
|
+
done();
|
|
3523
|
+
} catch (error) {
|
|
3524
|
+
log.error(`Test Failure: ${error}`);
|
|
3525
|
+
done(error);
|
|
3526
|
+
}
|
|
3527
|
+
}).timeout(attemptTimeout);
|
|
3528
|
+
it('should error if - missing vnfSnapshotPkgId', (done) => {
|
|
3529
|
+
try {
|
|
3530
|
+
a.postVnfSnapshotPackagesVnfSnapshotPkgIdPackageContentCancel(null, null, (data, error) => {
|
|
3531
|
+
try {
|
|
3532
|
+
const displayE = 'vnfSnapshotPkgId is required';
|
|
3533
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-postVnfSnapshotPackagesVnfSnapshotPkgIdPackageContentCancel', displayE);
|
|
3534
|
+
done();
|
|
3535
|
+
} catch (err) {
|
|
3536
|
+
log.error(`Test Failure: ${err}`);
|
|
3537
|
+
done(err);
|
|
3538
|
+
}
|
|
3539
|
+
});
|
|
3540
|
+
} catch (error) {
|
|
3541
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3542
|
+
done(error);
|
|
3543
|
+
}
|
|
3544
|
+
}).timeout(attemptTimeout);
|
|
3545
|
+
it('should error if - missing body', (done) => {
|
|
3546
|
+
try {
|
|
3547
|
+
a.postVnfSnapshotPackagesVnfSnapshotPkgIdPackageContentCancel('fakeparam', null, (data, error) => {
|
|
3548
|
+
try {
|
|
3549
|
+
const displayE = 'body is required';
|
|
3550
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-postVnfSnapshotPackagesVnfSnapshotPkgIdPackageContentCancel', displayE);
|
|
3551
|
+
done();
|
|
3552
|
+
} catch (err) {
|
|
3553
|
+
log.error(`Test Failure: ${err}`);
|
|
3554
|
+
done(err);
|
|
3555
|
+
}
|
|
3556
|
+
});
|
|
3557
|
+
} catch (error) {
|
|
3558
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3559
|
+
done(error);
|
|
3560
|
+
}
|
|
3561
|
+
}).timeout(attemptTimeout);
|
|
3562
|
+
});
|
|
3563
|
+
|
|
3564
|
+
describe('#getVnfSnapshotPackagesVnfSnapshotPkgIdExtArtifactsAccess - errors', () => {
|
|
3565
|
+
it('should have a getVnfSnapshotPackagesVnfSnapshotPkgIdExtArtifactsAccess function', (done) => {
|
|
3566
|
+
try {
|
|
3567
|
+
assert.equal(true, typeof a.getVnfSnapshotPackagesVnfSnapshotPkgIdExtArtifactsAccess === 'function');
|
|
3568
|
+
done();
|
|
3569
|
+
} catch (error) {
|
|
3570
|
+
log.error(`Test Failure: ${error}`);
|
|
3571
|
+
done(error);
|
|
3572
|
+
}
|
|
3573
|
+
}).timeout(attemptTimeout);
|
|
3574
|
+
it('should error if - missing vnfSnapshotPkgId', (done) => {
|
|
3575
|
+
try {
|
|
3576
|
+
a.getVnfSnapshotPackagesVnfSnapshotPkgIdExtArtifactsAccess(null, (data, error) => {
|
|
3577
|
+
try {
|
|
3578
|
+
const displayE = 'vnfSnapshotPkgId is required';
|
|
3579
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-getVnfSnapshotPackagesVnfSnapshotPkgIdExtArtifactsAccess', displayE);
|
|
3580
|
+
done();
|
|
3581
|
+
} catch (err) {
|
|
3582
|
+
log.error(`Test Failure: ${err}`);
|
|
3583
|
+
done(err);
|
|
3584
|
+
}
|
|
3585
|
+
});
|
|
3586
|
+
} catch (error) {
|
|
3587
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3588
|
+
done(error);
|
|
3589
|
+
}
|
|
3590
|
+
}).timeout(attemptTimeout);
|
|
3591
|
+
});
|
|
3592
|
+
|
|
3593
|
+
describe('#putVnfSnapshotPackagesVnfSnapshotPkgIdExtArtifactsAccess - errors', () => {
|
|
3594
|
+
it('should have a putVnfSnapshotPackagesVnfSnapshotPkgIdExtArtifactsAccess function', (done) => {
|
|
3595
|
+
try {
|
|
3596
|
+
assert.equal(true, typeof a.putVnfSnapshotPackagesVnfSnapshotPkgIdExtArtifactsAccess === 'function');
|
|
3597
|
+
done();
|
|
3598
|
+
} catch (error) {
|
|
3599
|
+
log.error(`Test Failure: ${error}`);
|
|
3600
|
+
done(error);
|
|
3601
|
+
}
|
|
3602
|
+
}).timeout(attemptTimeout);
|
|
3603
|
+
it('should error if - missing vnfSnapshotPkgId', (done) => {
|
|
3604
|
+
try {
|
|
3605
|
+
a.putVnfSnapshotPackagesVnfSnapshotPkgIdExtArtifactsAccess(null, null, (data, error) => {
|
|
3606
|
+
try {
|
|
3607
|
+
const displayE = 'vnfSnapshotPkgId is required';
|
|
3608
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-putVnfSnapshotPackagesVnfSnapshotPkgIdExtArtifactsAccess', displayE);
|
|
3609
|
+
done();
|
|
3610
|
+
} catch (err) {
|
|
3611
|
+
log.error(`Test Failure: ${err}`);
|
|
3612
|
+
done(err);
|
|
3613
|
+
}
|
|
3614
|
+
});
|
|
3615
|
+
} catch (error) {
|
|
3616
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3617
|
+
done(error);
|
|
3618
|
+
}
|
|
3619
|
+
}).timeout(attemptTimeout);
|
|
3620
|
+
it('should error if - missing body', (done) => {
|
|
3621
|
+
try {
|
|
3622
|
+
a.putVnfSnapshotPackagesVnfSnapshotPkgIdExtArtifactsAccess('fakeparam', null, (data, error) => {
|
|
3623
|
+
try {
|
|
3624
|
+
const displayE = 'body is required';
|
|
3625
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-putVnfSnapshotPackagesVnfSnapshotPkgIdExtArtifactsAccess', displayE);
|
|
3626
|
+
done();
|
|
3627
|
+
} catch (err) {
|
|
3628
|
+
log.error(`Test Failure: ${err}`);
|
|
3629
|
+
done(err);
|
|
3630
|
+
}
|
|
3631
|
+
});
|
|
3632
|
+
} catch (error) {
|
|
3633
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3634
|
+
done(error);
|
|
3635
|
+
}
|
|
3636
|
+
}).timeout(attemptTimeout);
|
|
3637
|
+
});
|
|
3638
|
+
|
|
3639
|
+
describe('#getVnfSnapshotPackagesVnfSnapshotPkgIdArtifactsArtifactPath - errors', () => {
|
|
3640
|
+
it('should have a getVnfSnapshotPackagesVnfSnapshotPkgIdArtifactsArtifactPath function', (done) => {
|
|
3641
|
+
try {
|
|
3642
|
+
assert.equal(true, typeof a.getVnfSnapshotPackagesVnfSnapshotPkgIdArtifactsArtifactPath === 'function');
|
|
3643
|
+
done();
|
|
3644
|
+
} catch (error) {
|
|
3645
|
+
log.error(`Test Failure: ${error}`);
|
|
3646
|
+
done(error);
|
|
3647
|
+
}
|
|
3648
|
+
}).timeout(attemptTimeout);
|
|
3649
|
+
it('should error if - missing vnfSnapshotPkgId', (done) => {
|
|
3650
|
+
try {
|
|
3651
|
+
a.getVnfSnapshotPackagesVnfSnapshotPkgIdArtifactsArtifactPath(null, null, (data, error) => {
|
|
3652
|
+
try {
|
|
3653
|
+
const displayE = 'vnfSnapshotPkgId is required';
|
|
3654
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-getVnfSnapshotPackagesVnfSnapshotPkgIdArtifactsArtifactPath', displayE);
|
|
3655
|
+
done();
|
|
3656
|
+
} catch (err) {
|
|
3657
|
+
log.error(`Test Failure: ${err}`);
|
|
3658
|
+
done(err);
|
|
3659
|
+
}
|
|
3660
|
+
});
|
|
3661
|
+
} catch (error) {
|
|
3662
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3663
|
+
done(error);
|
|
3664
|
+
}
|
|
3665
|
+
}).timeout(attemptTimeout);
|
|
3666
|
+
it('should error if - missing artifactPath', (done) => {
|
|
3667
|
+
try {
|
|
3668
|
+
a.getVnfSnapshotPackagesVnfSnapshotPkgIdArtifactsArtifactPath('fakeparam', null, (data, error) => {
|
|
3669
|
+
try {
|
|
3670
|
+
const displayE = 'artifactPath is required';
|
|
3671
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-getVnfSnapshotPackagesVnfSnapshotPkgIdArtifactsArtifactPath', displayE);
|
|
3672
|
+
done();
|
|
3673
|
+
} catch (err) {
|
|
3674
|
+
log.error(`Test Failure: ${err}`);
|
|
3675
|
+
done(err);
|
|
3676
|
+
}
|
|
3677
|
+
});
|
|
3678
|
+
} catch (error) {
|
|
3679
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3680
|
+
done(error);
|
|
3681
|
+
}
|
|
3682
|
+
}).timeout(attemptTimeout);
|
|
3683
|
+
});
|
|
3684
|
+
|
|
3685
|
+
describe('#querymultipleNSinstances - errors', () => {
|
|
3686
|
+
it('should have a querymultipleNSinstances function', (done) => {
|
|
3687
|
+
try {
|
|
3688
|
+
assert.equal(true, typeof a.querymultipleNSinstances === 'function');
|
|
3689
|
+
done();
|
|
3690
|
+
} catch (error) {
|
|
3691
|
+
log.error(`Test Failure: ${error}`);
|
|
3692
|
+
done(error);
|
|
3693
|
+
}
|
|
3694
|
+
}).timeout(attemptTimeout);
|
|
3695
|
+
});
|
|
3696
|
+
|
|
3697
|
+
describe('#createaNSinstanceresource - errors', () => {
|
|
3698
|
+
it('should have a createaNSinstanceresource function', (done) => {
|
|
3699
|
+
try {
|
|
3700
|
+
assert.equal(true, typeof a.createaNSinstanceresource === 'function');
|
|
3701
|
+
done();
|
|
3702
|
+
} catch (error) {
|
|
3703
|
+
log.error(`Test Failure: ${error}`);
|
|
3704
|
+
done(error);
|
|
3705
|
+
}
|
|
3706
|
+
}).timeout(attemptTimeout);
|
|
3707
|
+
it('should error if - missing body', (done) => {
|
|
3708
|
+
try {
|
|
3709
|
+
a.createaNSinstanceresource(null, (data, error) => {
|
|
3710
|
+
try {
|
|
3711
|
+
const displayE = 'body is required';
|
|
3712
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-createaNSinstanceresource', displayE);
|
|
3713
|
+
done();
|
|
3714
|
+
} catch (err) {
|
|
3715
|
+
log.error(`Test Failure: ${err}`);
|
|
3716
|
+
done(err);
|
|
3717
|
+
}
|
|
3718
|
+
});
|
|
3719
|
+
} catch (error) {
|
|
3720
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3721
|
+
done(error);
|
|
3722
|
+
}
|
|
3723
|
+
}).timeout(attemptTimeout);
|
|
3724
|
+
});
|
|
3725
|
+
|
|
3726
|
+
describe('#readanindividualNSinstanceresource - errors', () => {
|
|
3727
|
+
it('should have a readanindividualNSinstanceresource function', (done) => {
|
|
3728
|
+
try {
|
|
3729
|
+
assert.equal(true, typeof a.readanindividualNSinstanceresource === 'function');
|
|
3730
|
+
done();
|
|
3731
|
+
} catch (error) {
|
|
3732
|
+
log.error(`Test Failure: ${error}`);
|
|
3733
|
+
done(error);
|
|
3734
|
+
}
|
|
3735
|
+
}).timeout(attemptTimeout);
|
|
3736
|
+
it('should error if - missing nsInstanceId', (done) => {
|
|
3737
|
+
try {
|
|
3738
|
+
a.readanindividualNSinstanceresource(null, (data, error) => {
|
|
3739
|
+
try {
|
|
3740
|
+
const displayE = 'nsInstanceId is required';
|
|
3741
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-readanindividualNSinstanceresource', displayE);
|
|
3742
|
+
done();
|
|
3743
|
+
} catch (err) {
|
|
3744
|
+
log.error(`Test Failure: ${err}`);
|
|
3745
|
+
done(err);
|
|
3746
|
+
}
|
|
3747
|
+
});
|
|
3748
|
+
} catch (error) {
|
|
3749
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3750
|
+
done(error);
|
|
3751
|
+
}
|
|
3752
|
+
}).timeout(attemptTimeout);
|
|
3753
|
+
});
|
|
3754
|
+
|
|
3755
|
+
describe('#deleteNSinstanceresource - errors', () => {
|
|
3756
|
+
it('should have a deleteNSinstanceresource function', (done) => {
|
|
3757
|
+
try {
|
|
3758
|
+
assert.equal(true, typeof a.deleteNSinstanceresource === 'function');
|
|
3759
|
+
done();
|
|
3760
|
+
} catch (error) {
|
|
3761
|
+
log.error(`Test Failure: ${error}`);
|
|
3762
|
+
done(error);
|
|
3763
|
+
}
|
|
3764
|
+
}).timeout(attemptTimeout);
|
|
3765
|
+
it('should error if - missing nsInstanceId', (done) => {
|
|
3766
|
+
try {
|
|
3767
|
+
a.deleteNSinstanceresource(null, (data, error) => {
|
|
3768
|
+
try {
|
|
3769
|
+
const displayE = 'nsInstanceId is required';
|
|
3770
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-deleteNSinstanceresource', displayE);
|
|
3771
|
+
done();
|
|
3772
|
+
} catch (err) {
|
|
3773
|
+
log.error(`Test Failure: ${err}`);
|
|
3774
|
+
done(err);
|
|
3775
|
+
}
|
|
3776
|
+
});
|
|
3777
|
+
} catch (error) {
|
|
3778
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3779
|
+
done(error);
|
|
3780
|
+
}
|
|
3781
|
+
}).timeout(attemptTimeout);
|
|
3782
|
+
});
|
|
3783
|
+
|
|
3784
|
+
describe('#instantiateaNS - errors', () => {
|
|
3785
|
+
it('should have a instantiateaNS function', (done) => {
|
|
3786
|
+
try {
|
|
3787
|
+
assert.equal(true, typeof a.instantiateaNS === 'function');
|
|
3788
|
+
done();
|
|
3789
|
+
} catch (error) {
|
|
3790
|
+
log.error(`Test Failure: ${error}`);
|
|
3791
|
+
done(error);
|
|
3792
|
+
}
|
|
3793
|
+
}).timeout(attemptTimeout);
|
|
3794
|
+
it('should error if - missing nsInstanceId', (done) => {
|
|
3795
|
+
try {
|
|
3796
|
+
a.instantiateaNS(null, null, (data, error) => {
|
|
3797
|
+
try {
|
|
3798
|
+
const displayE = 'nsInstanceId is required';
|
|
3799
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-instantiateaNS', displayE);
|
|
3800
|
+
done();
|
|
3801
|
+
} catch (err) {
|
|
3802
|
+
log.error(`Test Failure: ${err}`);
|
|
3803
|
+
done(err);
|
|
3804
|
+
}
|
|
3805
|
+
});
|
|
3806
|
+
} catch (error) {
|
|
3807
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3808
|
+
done(error);
|
|
3809
|
+
}
|
|
3810
|
+
}).timeout(attemptTimeout);
|
|
3811
|
+
it('should error if - missing body', (done) => {
|
|
3812
|
+
try {
|
|
3813
|
+
a.instantiateaNS('fakeparam', null, (data, error) => {
|
|
3814
|
+
try {
|
|
3815
|
+
const displayE = 'body is required';
|
|
3816
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-instantiateaNS', displayE);
|
|
3817
|
+
done();
|
|
3818
|
+
} catch (err) {
|
|
3819
|
+
log.error(`Test Failure: ${err}`);
|
|
3820
|
+
done(err);
|
|
3821
|
+
}
|
|
3822
|
+
});
|
|
3823
|
+
} catch (error) {
|
|
3824
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3825
|
+
done(error);
|
|
3826
|
+
}
|
|
3827
|
+
}).timeout(attemptTimeout);
|
|
3828
|
+
});
|
|
3829
|
+
|
|
3830
|
+
describe('#scaleaNSinstance - errors', () => {
|
|
3831
|
+
it('should have a scaleaNSinstance function', (done) => {
|
|
3832
|
+
try {
|
|
3833
|
+
assert.equal(true, typeof a.scaleaNSinstance === 'function');
|
|
3834
|
+
done();
|
|
3835
|
+
} catch (error) {
|
|
3836
|
+
log.error(`Test Failure: ${error}`);
|
|
3837
|
+
done(error);
|
|
3838
|
+
}
|
|
3839
|
+
}).timeout(attemptTimeout);
|
|
3840
|
+
it('should error if - missing nsInstanceId', (done) => {
|
|
3841
|
+
try {
|
|
3842
|
+
a.scaleaNSinstance(null, null, (data, error) => {
|
|
3843
|
+
try {
|
|
3844
|
+
const displayE = 'nsInstanceId is required';
|
|
3845
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-scaleaNSinstance', displayE);
|
|
3846
|
+
done();
|
|
3847
|
+
} catch (err) {
|
|
3848
|
+
log.error(`Test Failure: ${err}`);
|
|
3849
|
+
done(err);
|
|
3850
|
+
}
|
|
3851
|
+
});
|
|
3852
|
+
} catch (error) {
|
|
3853
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3854
|
+
done(error);
|
|
3855
|
+
}
|
|
3856
|
+
}).timeout(attemptTimeout);
|
|
3857
|
+
it('should error if - missing body', (done) => {
|
|
3858
|
+
try {
|
|
3859
|
+
a.scaleaNSinstance('fakeparam', null, (data, error) => {
|
|
3860
|
+
try {
|
|
3861
|
+
const displayE = 'body is required';
|
|
3862
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-scaleaNSinstance', displayE);
|
|
3863
|
+
done();
|
|
3864
|
+
} catch (err) {
|
|
3865
|
+
log.error(`Test Failure: ${err}`);
|
|
3866
|
+
done(err);
|
|
3867
|
+
}
|
|
3868
|
+
});
|
|
3869
|
+
} catch (error) {
|
|
3870
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3871
|
+
done(error);
|
|
3872
|
+
}
|
|
3873
|
+
}).timeout(attemptTimeout);
|
|
3874
|
+
});
|
|
3875
|
+
|
|
3876
|
+
describe('#updatesaNSinstance - errors', () => {
|
|
3877
|
+
it('should have a updatesaNSinstance function', (done) => {
|
|
3878
|
+
try {
|
|
3879
|
+
assert.equal(true, typeof a.updatesaNSinstance === 'function');
|
|
3880
|
+
done();
|
|
3881
|
+
} catch (error) {
|
|
3882
|
+
log.error(`Test Failure: ${error}`);
|
|
3883
|
+
done(error);
|
|
3884
|
+
}
|
|
3885
|
+
}).timeout(attemptTimeout);
|
|
3886
|
+
it('should error if - missing nsInstanceId', (done) => {
|
|
3887
|
+
try {
|
|
3888
|
+
a.updatesaNSinstance(null, null, (data, error) => {
|
|
3889
|
+
try {
|
|
3890
|
+
const displayE = 'nsInstanceId is required';
|
|
3891
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-updatesaNSinstance', displayE);
|
|
3892
|
+
done();
|
|
3893
|
+
} catch (err) {
|
|
3894
|
+
log.error(`Test Failure: ${err}`);
|
|
3895
|
+
done(err);
|
|
3896
|
+
}
|
|
3897
|
+
});
|
|
3898
|
+
} catch (error) {
|
|
3899
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3900
|
+
done(error);
|
|
3901
|
+
}
|
|
3902
|
+
}).timeout(attemptTimeout);
|
|
3903
|
+
it('should error if - missing body', (done) => {
|
|
3904
|
+
try {
|
|
3905
|
+
a.updatesaNSinstance('fakeparam', null, (data, error) => {
|
|
3906
|
+
try {
|
|
3907
|
+
const displayE = 'body is required';
|
|
3908
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-updatesaNSinstance', displayE);
|
|
3909
|
+
done();
|
|
3910
|
+
} catch (err) {
|
|
3911
|
+
log.error(`Test Failure: ${err}`);
|
|
3912
|
+
done(err);
|
|
3913
|
+
}
|
|
3914
|
+
});
|
|
3915
|
+
} catch (error) {
|
|
3916
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3917
|
+
done(error);
|
|
3918
|
+
}
|
|
3919
|
+
}).timeout(attemptTimeout);
|
|
3920
|
+
});
|
|
3921
|
+
|
|
3922
|
+
describe('#healaNSinstance - errors', () => {
|
|
3923
|
+
it('should have a healaNSinstance function', (done) => {
|
|
3924
|
+
try {
|
|
3925
|
+
assert.equal(true, typeof a.healaNSinstance === 'function');
|
|
3926
|
+
done();
|
|
3927
|
+
} catch (error) {
|
|
3928
|
+
log.error(`Test Failure: ${error}`);
|
|
3929
|
+
done(error);
|
|
3930
|
+
}
|
|
3931
|
+
}).timeout(attemptTimeout);
|
|
3932
|
+
it('should error if - missing nsInstanceId', (done) => {
|
|
3933
|
+
try {
|
|
3934
|
+
a.healaNSinstance(null, null, (data, error) => {
|
|
3935
|
+
try {
|
|
3936
|
+
const displayE = 'nsInstanceId is required';
|
|
3937
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-healaNSinstance', displayE);
|
|
3938
|
+
done();
|
|
3939
|
+
} catch (err) {
|
|
3940
|
+
log.error(`Test Failure: ${err}`);
|
|
3941
|
+
done(err);
|
|
3942
|
+
}
|
|
3943
|
+
});
|
|
3944
|
+
} catch (error) {
|
|
3945
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3946
|
+
done(error);
|
|
3947
|
+
}
|
|
3948
|
+
}).timeout(attemptTimeout);
|
|
3949
|
+
it('should error if - missing body', (done) => {
|
|
3950
|
+
try {
|
|
3951
|
+
a.healaNSinstance('fakeparam', null, (data, error) => {
|
|
3952
|
+
try {
|
|
3953
|
+
const displayE = 'body is required';
|
|
3954
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-healaNSinstance', displayE);
|
|
3955
|
+
done();
|
|
3956
|
+
} catch (err) {
|
|
3957
|
+
log.error(`Test Failure: ${err}`);
|
|
3958
|
+
done(err);
|
|
3959
|
+
}
|
|
3960
|
+
});
|
|
3961
|
+
} catch (error) {
|
|
3962
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3963
|
+
done(error);
|
|
3964
|
+
}
|
|
3965
|
+
}).timeout(attemptTimeout);
|
|
3966
|
+
});
|
|
3967
|
+
|
|
3968
|
+
describe('#terminateaNSinstance - errors', () => {
|
|
3969
|
+
it('should have a terminateaNSinstance function', (done) => {
|
|
3970
|
+
try {
|
|
3971
|
+
assert.equal(true, typeof a.terminateaNSinstance === 'function');
|
|
3972
|
+
done();
|
|
3973
|
+
} catch (error) {
|
|
3974
|
+
log.error(`Test Failure: ${error}`);
|
|
3975
|
+
done(error);
|
|
3976
|
+
}
|
|
3977
|
+
}).timeout(attemptTimeout);
|
|
3978
|
+
it('should error if - missing nsInstanceId', (done) => {
|
|
3979
|
+
try {
|
|
3980
|
+
a.terminateaNSinstance(null, null, (data, error) => {
|
|
3981
|
+
try {
|
|
3982
|
+
const displayE = 'nsInstanceId is required';
|
|
3983
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-terminateaNSinstance', displayE);
|
|
3984
|
+
done();
|
|
3985
|
+
} catch (err) {
|
|
3986
|
+
log.error(`Test Failure: ${err}`);
|
|
3987
|
+
done(err);
|
|
3988
|
+
}
|
|
3989
|
+
});
|
|
3990
|
+
} catch (error) {
|
|
3991
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3992
|
+
done(error);
|
|
3993
|
+
}
|
|
3994
|
+
}).timeout(attemptTimeout);
|
|
3995
|
+
it('should error if - missing body', (done) => {
|
|
3996
|
+
try {
|
|
3997
|
+
a.terminateaNSinstance('fakeparam', null, (data, error) => {
|
|
3998
|
+
try {
|
|
3999
|
+
const displayE = 'body is required';
|
|
4000
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-terminateaNSinstance', displayE);
|
|
4001
|
+
done();
|
|
4002
|
+
} catch (err) {
|
|
4003
|
+
log.error(`Test Failure: ${err}`);
|
|
4004
|
+
done(err);
|
|
4005
|
+
}
|
|
4006
|
+
});
|
|
4007
|
+
} catch (error) {
|
|
4008
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4009
|
+
done(error);
|
|
4010
|
+
}
|
|
4011
|
+
}).timeout(attemptTimeout);
|
|
4012
|
+
});
|
|
4013
|
+
|
|
4014
|
+
describe('#querymultipleNSLCMoperationoccurrences - errors', () => {
|
|
4015
|
+
it('should have a querymultipleNSLCMoperationoccurrences function', (done) => {
|
|
4016
|
+
try {
|
|
4017
|
+
assert.equal(true, typeof a.querymultipleNSLCMoperationoccurrences === 'function');
|
|
4018
|
+
done();
|
|
4019
|
+
} catch (error) {
|
|
4020
|
+
log.error(`Test Failure: ${error}`);
|
|
4021
|
+
done(error);
|
|
4022
|
+
}
|
|
4023
|
+
}).timeout(attemptTimeout);
|
|
4024
|
+
});
|
|
4025
|
+
|
|
4026
|
+
describe('#readanindividualNSLCMoperationoccurrenceresource - errors', () => {
|
|
4027
|
+
it('should have a readanindividualNSLCMoperationoccurrenceresource function', (done) => {
|
|
4028
|
+
try {
|
|
4029
|
+
assert.equal(true, typeof a.readanindividualNSLCMoperationoccurrenceresource === 'function');
|
|
4030
|
+
done();
|
|
4031
|
+
} catch (error) {
|
|
4032
|
+
log.error(`Test Failure: ${error}`);
|
|
4033
|
+
done(error);
|
|
4034
|
+
}
|
|
4035
|
+
}).timeout(attemptTimeout);
|
|
4036
|
+
it('should error if - missing nsLcmOpOccId', (done) => {
|
|
4037
|
+
try {
|
|
4038
|
+
a.readanindividualNSLCMoperationoccurrenceresource(null, (data, error) => {
|
|
4039
|
+
try {
|
|
4040
|
+
const displayE = 'nsLcmOpOccId is required';
|
|
4041
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-readanindividualNSLCMoperationoccurrenceresource', displayE);
|
|
4042
|
+
done();
|
|
4043
|
+
} catch (err) {
|
|
4044
|
+
log.error(`Test Failure: ${err}`);
|
|
4045
|
+
done(err);
|
|
4046
|
+
}
|
|
4047
|
+
});
|
|
4048
|
+
} catch (error) {
|
|
4049
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4050
|
+
done(error);
|
|
4051
|
+
}
|
|
4052
|
+
}).timeout(attemptTimeout);
|
|
4053
|
+
});
|
|
4054
|
+
|
|
4055
|
+
describe('#retryaNSlifecyclemanagementoperationoccurrence - errors', () => {
|
|
4056
|
+
it('should have a retryaNSlifecyclemanagementoperationoccurrence function', (done) => {
|
|
4057
|
+
try {
|
|
4058
|
+
assert.equal(true, typeof a.retryaNSlifecyclemanagementoperationoccurrence === 'function');
|
|
4059
|
+
done();
|
|
4060
|
+
} catch (error) {
|
|
4061
|
+
log.error(`Test Failure: ${error}`);
|
|
4062
|
+
done(error);
|
|
4063
|
+
}
|
|
4064
|
+
}).timeout(attemptTimeout);
|
|
4065
|
+
it('should error if - missing nsLcmOpOccId', (done) => {
|
|
4066
|
+
try {
|
|
4067
|
+
a.retryaNSlifecyclemanagementoperationoccurrence(null, (data, error) => {
|
|
4068
|
+
try {
|
|
4069
|
+
const displayE = 'nsLcmOpOccId is required';
|
|
4070
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-retryaNSlifecyclemanagementoperationoccurrence', displayE);
|
|
4071
|
+
done();
|
|
4072
|
+
} catch (err) {
|
|
4073
|
+
log.error(`Test Failure: ${err}`);
|
|
4074
|
+
done(err);
|
|
4075
|
+
}
|
|
4076
|
+
});
|
|
4077
|
+
} catch (error) {
|
|
4078
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4079
|
+
done(error);
|
|
4080
|
+
}
|
|
4081
|
+
}).timeout(attemptTimeout);
|
|
4082
|
+
});
|
|
4083
|
+
|
|
4084
|
+
describe('#rollbackaNSlifecyclemanagementoperationoccurrence - errors', () => {
|
|
4085
|
+
it('should have a rollbackaNSlifecyclemanagementoperationoccurrence function', (done) => {
|
|
4086
|
+
try {
|
|
4087
|
+
assert.equal(true, typeof a.rollbackaNSlifecyclemanagementoperationoccurrence === 'function');
|
|
4088
|
+
done();
|
|
4089
|
+
} catch (error) {
|
|
4090
|
+
log.error(`Test Failure: ${error}`);
|
|
4091
|
+
done(error);
|
|
4092
|
+
}
|
|
4093
|
+
}).timeout(attemptTimeout);
|
|
4094
|
+
it('should error if - missing nsLcmOpOccId', (done) => {
|
|
4095
|
+
try {
|
|
4096
|
+
a.rollbackaNSlifecyclemanagementoperationoccurrence(null, (data, error) => {
|
|
4097
|
+
try {
|
|
4098
|
+
const displayE = 'nsLcmOpOccId is required';
|
|
4099
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-rollbackaNSlifecyclemanagementoperationoccurrence', displayE);
|
|
4100
|
+
done();
|
|
4101
|
+
} catch (err) {
|
|
4102
|
+
log.error(`Test Failure: ${err}`);
|
|
4103
|
+
done(err);
|
|
4104
|
+
}
|
|
4105
|
+
});
|
|
4106
|
+
} catch (error) {
|
|
4107
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4108
|
+
done(error);
|
|
4109
|
+
}
|
|
4110
|
+
}).timeout(attemptTimeout);
|
|
4111
|
+
});
|
|
4112
|
+
|
|
4113
|
+
describe('#continueaNSlifecyclemanagementoperationoccurrence - errors', () => {
|
|
4114
|
+
it('should have a continueaNSlifecyclemanagementoperationoccurrence function', (done) => {
|
|
4115
|
+
try {
|
|
4116
|
+
assert.equal(true, typeof a.continueaNSlifecyclemanagementoperationoccurrence === 'function');
|
|
4117
|
+
done();
|
|
4118
|
+
} catch (error) {
|
|
4119
|
+
log.error(`Test Failure: ${error}`);
|
|
4120
|
+
done(error);
|
|
4121
|
+
}
|
|
4122
|
+
}).timeout(attemptTimeout);
|
|
4123
|
+
it('should error if - missing nsLcmOpOccId', (done) => {
|
|
4124
|
+
try {
|
|
4125
|
+
a.continueaNSlifecyclemanagementoperationoccurrence(null, (data, error) => {
|
|
4126
|
+
try {
|
|
4127
|
+
const displayE = 'nsLcmOpOccId is required';
|
|
4128
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-continueaNSlifecyclemanagementoperationoccurrence', displayE);
|
|
4129
|
+
done();
|
|
4130
|
+
} catch (err) {
|
|
4131
|
+
log.error(`Test Failure: ${err}`);
|
|
4132
|
+
done(err);
|
|
4133
|
+
}
|
|
4134
|
+
});
|
|
4135
|
+
} catch (error) {
|
|
4136
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4137
|
+
done(error);
|
|
4138
|
+
}
|
|
4139
|
+
}).timeout(attemptTimeout);
|
|
4140
|
+
});
|
|
4141
|
+
|
|
4142
|
+
describe('#markaNSlifecyclemanagementoperationoccurrenceasfailed - errors', () => {
|
|
4143
|
+
it('should have a markaNSlifecyclemanagementoperationoccurrenceasfailed function', (done) => {
|
|
4144
|
+
try {
|
|
4145
|
+
assert.equal(true, typeof a.markaNSlifecyclemanagementoperationoccurrenceasfailed === 'function');
|
|
4146
|
+
done();
|
|
4147
|
+
} catch (error) {
|
|
4148
|
+
log.error(`Test Failure: ${error}`);
|
|
4149
|
+
done(error);
|
|
4150
|
+
}
|
|
4151
|
+
}).timeout(attemptTimeout);
|
|
4152
|
+
it('should error if - missing nsLcmOpOccId', (done) => {
|
|
4153
|
+
try {
|
|
4154
|
+
a.markaNSlifecyclemanagementoperationoccurrenceasfailed(null, (data, error) => {
|
|
4155
|
+
try {
|
|
4156
|
+
const displayE = 'nsLcmOpOccId is required';
|
|
4157
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-markaNSlifecyclemanagementoperationoccurrenceasfailed', displayE);
|
|
4158
|
+
done();
|
|
4159
|
+
} catch (err) {
|
|
4160
|
+
log.error(`Test Failure: ${err}`);
|
|
4161
|
+
done(err);
|
|
4162
|
+
}
|
|
4163
|
+
});
|
|
4164
|
+
} catch (error) {
|
|
4165
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4166
|
+
done(error);
|
|
4167
|
+
}
|
|
4168
|
+
}).timeout(attemptTimeout);
|
|
4169
|
+
});
|
|
4170
|
+
|
|
4171
|
+
describe('#cancelaNSlifecyclemanagementoperationoccurrence - errors', () => {
|
|
4172
|
+
it('should have a cancelaNSlifecyclemanagementoperationoccurrence function', (done) => {
|
|
4173
|
+
try {
|
|
4174
|
+
assert.equal(true, typeof a.cancelaNSlifecyclemanagementoperationoccurrence === 'function');
|
|
4175
|
+
done();
|
|
4176
|
+
} catch (error) {
|
|
4177
|
+
log.error(`Test Failure: ${error}`);
|
|
4178
|
+
done(error);
|
|
4179
|
+
}
|
|
4180
|
+
}).timeout(attemptTimeout);
|
|
4181
|
+
it('should error if - missing nsLcmOpOccId', (done) => {
|
|
4182
|
+
try {
|
|
4183
|
+
a.cancelaNSlifecyclemanagementoperationoccurrence(null, null, (data, error) => {
|
|
4184
|
+
try {
|
|
4185
|
+
const displayE = 'nsLcmOpOccId is required';
|
|
4186
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-cancelaNSlifecyclemanagementoperationoccurrence', displayE);
|
|
4187
|
+
done();
|
|
4188
|
+
} catch (err) {
|
|
4189
|
+
log.error(`Test Failure: ${err}`);
|
|
4190
|
+
done(err);
|
|
4191
|
+
}
|
|
4192
|
+
});
|
|
4193
|
+
} catch (error) {
|
|
4194
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4195
|
+
done(error);
|
|
4196
|
+
}
|
|
4197
|
+
}).timeout(attemptTimeout);
|
|
4198
|
+
it('should error if - missing body', (done) => {
|
|
4199
|
+
try {
|
|
4200
|
+
a.cancelaNSlifecyclemanagementoperationoccurrence('fakeparam', null, (data, error) => {
|
|
4201
|
+
try {
|
|
4202
|
+
const displayE = 'body is required';
|
|
4203
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-cancelaNSlifecyclemanagementoperationoccurrence', displayE);
|
|
4204
|
+
done();
|
|
4205
|
+
} catch (err) {
|
|
4206
|
+
log.error(`Test Failure: ${err}`);
|
|
4207
|
+
done(err);
|
|
4208
|
+
}
|
|
4209
|
+
});
|
|
4210
|
+
} catch (error) {
|
|
4211
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4212
|
+
done(error);
|
|
4213
|
+
}
|
|
4214
|
+
}).timeout(attemptTimeout);
|
|
4215
|
+
});
|
|
4216
|
+
|
|
4217
|
+
describe('#queryVNFsnapshots - errors', () => {
|
|
4218
|
+
it('should have a queryVNFsnapshots function', (done) => {
|
|
4219
|
+
try {
|
|
4220
|
+
assert.equal(true, typeof a.queryVNFsnapshots === 'function');
|
|
4221
|
+
done();
|
|
4222
|
+
} catch (error) {
|
|
4223
|
+
log.error(`Test Failure: ${error}`);
|
|
4224
|
+
done(error);
|
|
4225
|
+
}
|
|
4226
|
+
}).timeout(attemptTimeout);
|
|
4227
|
+
});
|
|
4228
|
+
|
|
4229
|
+
describe('#queryanIndividualVNFsnapshot - errors', () => {
|
|
4230
|
+
it('should have a queryanIndividualVNFsnapshot function', (done) => {
|
|
4231
|
+
try {
|
|
4232
|
+
assert.equal(true, typeof a.queryanIndividualVNFsnapshot === 'function');
|
|
4233
|
+
done();
|
|
4234
|
+
} catch (error) {
|
|
4235
|
+
log.error(`Test Failure: ${error}`);
|
|
4236
|
+
done(error);
|
|
4237
|
+
}
|
|
4238
|
+
}).timeout(attemptTimeout);
|
|
4239
|
+
it('should error if - missing vnfSnapshotInfoId', (done) => {
|
|
4240
|
+
try {
|
|
4241
|
+
a.queryanIndividualVNFsnapshot(null, (data, error) => {
|
|
4242
|
+
try {
|
|
4243
|
+
const displayE = 'vnfSnapshotInfoId is required';
|
|
4244
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-queryanIndividualVNFsnapshot', displayE);
|
|
4245
|
+
done();
|
|
4246
|
+
} catch (err) {
|
|
4247
|
+
log.error(`Test Failure: ${err}`);
|
|
4248
|
+
done(err);
|
|
4249
|
+
}
|
|
4250
|
+
});
|
|
4251
|
+
} catch (error) {
|
|
4252
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4253
|
+
done(error);
|
|
4254
|
+
}
|
|
4255
|
+
}).timeout(attemptTimeout);
|
|
4256
|
+
});
|
|
4257
|
+
|
|
4258
|
+
describe('#deleteanIndividualVNFsnapshot - errors', () => {
|
|
4259
|
+
it('should have a deleteanIndividualVNFsnapshot function', (done) => {
|
|
4260
|
+
try {
|
|
4261
|
+
assert.equal(true, typeof a.deleteanIndividualVNFsnapshot === 'function');
|
|
4262
|
+
done();
|
|
4263
|
+
} catch (error) {
|
|
4264
|
+
log.error(`Test Failure: ${error}`);
|
|
4265
|
+
done(error);
|
|
4266
|
+
}
|
|
4267
|
+
}).timeout(attemptTimeout);
|
|
4268
|
+
it('should error if - missing vnfSnapshotInfoId', (done) => {
|
|
4269
|
+
try {
|
|
4270
|
+
a.deleteanIndividualVNFsnapshot(null, (data, error) => {
|
|
4271
|
+
try {
|
|
4272
|
+
const displayE = 'vnfSnapshotInfoId is required';
|
|
4273
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-etsi_sol005-adapter-deleteanIndividualVNFsnapshot', displayE);
|
|
4274
|
+
done();
|
|
4275
|
+
} catch (err) {
|
|
4276
|
+
log.error(`Test Failure: ${err}`);
|
|
4277
|
+
done(err);
|
|
4278
|
+
}
|
|
4279
|
+
});
|
|
4280
|
+
} catch (error) {
|
|
4281
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4282
|
+
done(error);
|
|
4283
|
+
}
|
|
4284
|
+
}).timeout(attemptTimeout);
|
|
4285
|
+
});
|
|
4286
|
+
});
|
|
4287
|
+
});
|