@itentialopensource/adapter-beyond_trust 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 +6 -0
- package/.eslintrc.js +18 -0
- package/.gitlab/.gitkeep +0 -0
- package/.gitlab/issue_templates/.gitkeep +0 -0
- package/.gitlab/issue_templates/Default.md +17 -0
- package/.gitlab/issue_templates/bugReportTemplate.md +76 -0
- package/.gitlab/issue_templates/featureRequestTemplate.md +14 -0
- package/.jshintrc +0 -0
- package/AUTH.md +39 -0
- package/BROKER.md +199 -0
- package/CALLS.md +1004 -0
- package/CHANGELOG.md +9 -0
- package/CODE_OF_CONDUCT.md +43 -0
- package/CONTRIBUTING.md +13 -0
- package/ENHANCE.md +69 -0
- package/LICENSE +201 -0
- package/PROPERTIES.md +641 -0
- package/README.md +346 -0
- package/SUMMARY.md +9 -0
- package/SYSTEMINFO.md +11 -0
- package/TAB1.md +5 -0
- package/TAB2.md +2226 -0
- package/TROUBLESHOOT.md +47 -0
- package/adapter.js +12401 -0
- package/adapterBase.js +1452 -0
- package/entities/.generic/action.json +214 -0
- package/entities/.generic/schema.json +28 -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/GroupPolicy/action.json +495 -0
- package/entities/GroupPolicy/mockdatafiles/apiConfigGroupPolicyIndex-default.json +18 -0
- package/entities/GroupPolicy/mockdatafiles/apiConfigGroupPolicyJumpGroupIndex-default.json +12 -0
- package/entities/GroupPolicy/mockdatafiles/apiConfigGroupPolicyJumpointsIndex-default.json +8 -0
- package/entities/GroupPolicy/mockdatafiles/apiConfigGroupPolicyMemberIndex-default.json +26 -0
- package/entities/GroupPolicy/mockdatafiles/apiConfigGroupPolicyTeamIndex-default.json +10 -0
- package/entities/GroupPolicy/mockdatafiles/apiConfigGroupPolicyVaultAccountIndex-default.json +7 -0
- package/entities/GroupPolicy/schema.json +119 -0
- package/entities/JumpClient/action.json +147 -0
- package/entities/JumpClient/mockdatafiles/apiConfigJumpClientIndex-default.json +29 -0
- package/entities/JumpClient/schema.json +124 -0
- package/entities/JumpGroup/action.json +208 -0
- package/entities/JumpGroup/mockdatafiles/apiConfigJumpGroupIndex-default.json +30 -0
- package/entities/JumpGroup/mockdatafiles/apiConfigJumpGroupUserIndex-default.json +7 -0
- package/entities/JumpGroup/schema.json +72 -0
- package/entities/JumpItem/action.json +370 -0
- package/entities/JumpItem/mockdatafiles/apiConfigJumpItemRemoteRdpIndex-default.json +52 -0
- package/entities/JumpItem/mockdatafiles/apiConfigJumpItemShellJumpIndex-default.json +70 -0
- package/entities/JumpItem/mockdatafiles/apiConfigJumpItemWebJumpIndex-default.json +38 -0
- package/entities/JumpItem/schema.json +91 -0
- package/entities/JumpItemRole/action.json +46 -0
- package/entities/JumpItemRole/mockdatafiles/apiConfigJumpItemRoleIndex-default.json +34 -0
- package/entities/JumpItemRole/schema.json +42 -0
- package/entities/JumpPolicy/action.json +127 -0
- package/entities/JumpPolicy/mockdatafiles/apiConfigJumpPolicyIndex-default.json +86 -0
- package/entities/JumpPolicy/schema.json +57 -0
- package/entities/Jumpoint/action.json +230 -0
- package/entities/Jumpoint/mockdatafiles/apiConfigJumpointIndex-default.json +50 -0
- package/entities/Jumpoint/schema.json +95 -0
- package/entities/OpenapiYaml/action.json +25 -0
- package/entities/OpenapiYaml/schema.json +19 -0
- package/entities/SecurityProvider/action.json +25 -0
- package/entities/SecurityProvider/mockdatafiles/apiConfigSecurityProviderIndex-default.json +26 -0
- package/entities/SecurityProvider/schema.json +41 -0
- package/entities/SessionPolicy/action.json +25 -0
- package/entities/SessionPolicy/mockdatafiles/apiConfigSessionPolicyIndex-default.json +20 -0
- package/entities/SessionPolicy/schema.json +41 -0
- package/entities/Team/action.json +208 -0
- package/entities/Team/mockdatafiles/apiConfigTeamIndex-default.json +14 -0
- package/entities/Team/mockdatafiles/apiConfigTeamUserIndex-default.json +7 -0
- package/entities/Team/schema.json +72 -0
- package/entities/User/action.json +106 -0
- package/entities/User/mockdatafiles/apiConfigUserIndex-default.json +18 -0
- package/entities/User/schema.json +67 -0
- package/entities/Vault/action.json +676 -0
- package/entities/Vault/mockdatafiles/apiConfigVaultAccountGroupAccountIndex-default.json +18 -0
- package/entities/Vault/mockdatafiles/apiConfigVaultAccountGroupUserIndex-default.json +22 -0
- package/entities/Vault/mockdatafiles/apiConfigVaultAccountIndex-default.json +22 -0
- package/entities/Vault/mockdatafiles/apiConfigVaultAccountUserIndex-default.json +6 -0
- package/entities/Vault/schema.json +128 -0
- package/entities/Vendor/action.json +208 -0
- package/entities/Vendor/mockdatafiles/apiConfigVendorIndex-default.json +32 -0
- package/entities/Vendor/mockdatafiles/apiConfigVendorUserIndex-default.json +17 -0
- package/entities/Vendor/schema.json +61 -0
- package/error.json +190 -0
- package/metadata.json +50 -0
- package/package.json +83 -0
- package/pronghorn.json +9958 -0
- package/propertiesDecorators.json +14 -0
- package/propertiesSchema.json +1569 -0
- package/refs?service=git-upload-pack +0 -0
- package/report/adapterInfo.json +10 -0
- package/report/bt-pra-configuration.openapi.yaml-OpenApi3.json +13155 -0
- package/report/creationReport.json +970 -0
- package/sampleProperties.json +256 -0
- package/test/integration/adapterTestBasicGet.js +83 -0
- package/test/integration/adapterTestConnectivity.js +142 -0
- package/test/integration/adapterTestIntegration.js +4162 -0
- package/test/unit/adapterBaseTestUnit.js +1024 -0
- package/test/unit/adapterTestUnit.js +6145 -0
- package/utils/adapterInfo.js +206 -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 +179 -0
- package/utils/findPath.js +74 -0
- package/utils/methodDocumentor.js +273 -0
- package/utils/modify.js +152 -0
- package/utils/packModificationScript.js +35 -0
- package/utils/patches2bundledDeps.js +90 -0
- package/utils/pre-commit.sh +32 -0
- package/utils/removeHooks.js +20 -0
- package/utils/setup.js +33 -0
- package/utils/taskMover.js +309 -0
- package/utils/tbScript.js +239 -0
- package/utils/tbUtils.js +489 -0
- package/utils/testRunner.js +298 -0
- package/utils/troubleshootingAdapter.js +193 -0
|
@@ -0,0 +1,4162 @@
|
|
|
1
|
+
/* @copyright Itential, LLC 2019 (pre-modifications) */
|
|
2
|
+
|
|
3
|
+
// Set globals
|
|
4
|
+
/* global describe it log pronghornProps */
|
|
5
|
+
/* eslint no-unused-vars: warn */
|
|
6
|
+
/* eslint no-underscore-dangle: warn */
|
|
7
|
+
/* eslint import/no-dynamic-require:warn */
|
|
8
|
+
|
|
9
|
+
// include required items for testing & logging
|
|
10
|
+
const assert = require('assert');
|
|
11
|
+
const fs = require('fs');
|
|
12
|
+
const path = require('path');
|
|
13
|
+
const util = require('util');
|
|
14
|
+
const mocha = require('mocha');
|
|
15
|
+
const winston = require('winston');
|
|
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 isRapidFail = false;
|
|
25
|
+
const isSaveMockData = false;
|
|
26
|
+
|
|
27
|
+
// read in the properties from the sampleProperties files
|
|
28
|
+
let adaptdir = __dirname;
|
|
29
|
+
if (adaptdir.endsWith('/test/integration')) {
|
|
30
|
+
adaptdir = adaptdir.substring(0, adaptdir.length - 17);
|
|
31
|
+
} else if (adaptdir.endsWith('/test/unit')) {
|
|
32
|
+
adaptdir = adaptdir.substring(0, adaptdir.length - 10);
|
|
33
|
+
}
|
|
34
|
+
const samProps = require(`${adaptdir}/sampleProperties.json`).properties;
|
|
35
|
+
|
|
36
|
+
// these variables can be changed to run in integrated mode so easier to set them here
|
|
37
|
+
// always check these in with bogus data!!!
|
|
38
|
+
samProps.stub = true;
|
|
39
|
+
samProps.host = 'replace.hostorip.here';
|
|
40
|
+
samProps.authentication.username = 'username';
|
|
41
|
+
samProps.authentication.password = 'password';
|
|
42
|
+
samProps.protocol = 'http';
|
|
43
|
+
samProps.port = 80;
|
|
44
|
+
samProps.ssl.enabled = false;
|
|
45
|
+
samProps.ssl.accept_invalid_cert = false;
|
|
46
|
+
if (samProps.request.attempt_timeout < 30000) {
|
|
47
|
+
samProps.request.attempt_timeout = 30000;
|
|
48
|
+
}
|
|
49
|
+
const attemptTimeout = samProps.request.attempt_timeout;
|
|
50
|
+
const { stub } = samProps;
|
|
51
|
+
|
|
52
|
+
// these are the adapter properties. You generally should not need to alter
|
|
53
|
+
// any of these after they are initially set up
|
|
54
|
+
global.pronghornProps = {
|
|
55
|
+
pathProps: {
|
|
56
|
+
encrypted: false
|
|
57
|
+
},
|
|
58
|
+
adapterProps: {
|
|
59
|
+
adapters: [{
|
|
60
|
+
id: 'Test-beyond_trust',
|
|
61
|
+
type: 'BeyondTrust',
|
|
62
|
+
properties: samProps
|
|
63
|
+
}]
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
global.$HOME = `${__dirname}/../..`;
|
|
68
|
+
|
|
69
|
+
// set the log levels that Pronghorn uses, spam and trace are not defaulted in so without
|
|
70
|
+
// this you may error on log.trace calls.
|
|
71
|
+
const myCustomLevels = {
|
|
72
|
+
levels: {
|
|
73
|
+
spam: 6,
|
|
74
|
+
trace: 5,
|
|
75
|
+
debug: 4,
|
|
76
|
+
info: 3,
|
|
77
|
+
warn: 2,
|
|
78
|
+
error: 1,
|
|
79
|
+
none: 0
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
// need to see if there is a log level passed in
|
|
84
|
+
process.argv.forEach((val) => {
|
|
85
|
+
// is there a log level defined to be passed in?
|
|
86
|
+
if (val.indexOf('--LOG') === 0) {
|
|
87
|
+
// get the desired log level
|
|
88
|
+
const inputVal = val.split('=')[1];
|
|
89
|
+
|
|
90
|
+
// validate the log level is supported, if so set it
|
|
91
|
+
if (Object.hasOwnProperty.call(myCustomLevels.levels, inputVal)) {
|
|
92
|
+
logLevel = inputVal;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
// need to set global logging
|
|
98
|
+
global.log = winston.createLogger({
|
|
99
|
+
level: logLevel,
|
|
100
|
+
levels: myCustomLevels.levels,
|
|
101
|
+
transports: [
|
|
102
|
+
new winston.transports.Console()
|
|
103
|
+
]
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Runs the common asserts for test
|
|
108
|
+
*/
|
|
109
|
+
function runCommonAsserts(data, error) {
|
|
110
|
+
assert.equal(undefined, error);
|
|
111
|
+
assert.notEqual(undefined, data);
|
|
112
|
+
assert.notEqual(null, data);
|
|
113
|
+
assert.notEqual(undefined, data.response);
|
|
114
|
+
assert.notEqual(null, data.response);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Runs the error asserts for the test
|
|
119
|
+
*/
|
|
120
|
+
function runErrorAsserts(data, error, code, origin, displayStr) {
|
|
121
|
+
assert.equal(null, data);
|
|
122
|
+
assert.notEqual(undefined, error);
|
|
123
|
+
assert.notEqual(null, error);
|
|
124
|
+
assert.notEqual(undefined, error.IAPerror);
|
|
125
|
+
assert.notEqual(null, error.IAPerror);
|
|
126
|
+
assert.notEqual(undefined, error.IAPerror.displayString);
|
|
127
|
+
assert.notEqual(null, error.IAPerror.displayString);
|
|
128
|
+
assert.equal(code, error.icode);
|
|
129
|
+
assert.equal(origin, error.IAPerror.origin);
|
|
130
|
+
assert.equal(displayStr, error.IAPerror.displayString);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* @function saveMockData
|
|
135
|
+
* Attempts to take data from responses and place them in MockDataFiles to help create Mockdata.
|
|
136
|
+
* Note, this was built based on entity file structure for Adapter-Engine 1.6.x
|
|
137
|
+
* @param {string} entityName - Name of the entity saving mock data for
|
|
138
|
+
* @param {string} actionName - Name of the action saving mock data for
|
|
139
|
+
* @param {string} descriptor - Something to describe this test (used as a type)
|
|
140
|
+
* @param {string or object} responseData - The data to put in the mock file.
|
|
141
|
+
*/
|
|
142
|
+
function saveMockData(entityName, actionName, descriptor, responseData) {
|
|
143
|
+
// do not need to save mockdata if we are running in stub mode (already has mock data) or if told not to save
|
|
144
|
+
if (stub || !isSaveMockData) {
|
|
145
|
+
return false;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// must have a response in order to store the response
|
|
149
|
+
if (responseData && responseData.response) {
|
|
150
|
+
let data = responseData.response;
|
|
151
|
+
|
|
152
|
+
// if there was a raw response that one is better as it is untranslated
|
|
153
|
+
if (responseData.raw) {
|
|
154
|
+
data = responseData.raw;
|
|
155
|
+
|
|
156
|
+
try {
|
|
157
|
+
const temp = JSON.parse(data);
|
|
158
|
+
data = temp;
|
|
159
|
+
} catch (pex) {
|
|
160
|
+
// do not care if it did not parse as we will just use data
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
try {
|
|
165
|
+
const base = path.join(__dirname, `../../entities/${entityName}/`);
|
|
166
|
+
const mockdatafolder = 'mockdatafiles';
|
|
167
|
+
const filename = `mockdatafiles/${actionName}-${descriptor}.json`;
|
|
168
|
+
|
|
169
|
+
if (!fs.existsSync(base + mockdatafolder)) {
|
|
170
|
+
fs.mkdirSync(base + mockdatafolder);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// write the data we retrieved
|
|
174
|
+
fs.writeFile(base + filename, JSON.stringify(data, null, 2), 'utf8', (errWritingMock) => {
|
|
175
|
+
if (errWritingMock) throw errWritingMock;
|
|
176
|
+
|
|
177
|
+
// update the action file to reflect the changes. Note: We're replacing the default object for now!
|
|
178
|
+
fs.readFile(`${base}action.json`, (errRead, content) => {
|
|
179
|
+
if (errRead) throw errRead;
|
|
180
|
+
|
|
181
|
+
// parse the action file into JSON
|
|
182
|
+
const parsedJson = JSON.parse(content);
|
|
183
|
+
|
|
184
|
+
// The object update we'll write in.
|
|
185
|
+
const responseObj = {
|
|
186
|
+
type: descriptor,
|
|
187
|
+
key: '',
|
|
188
|
+
mockFile: filename
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
// get the object for method we're trying to change.
|
|
192
|
+
const currentMethodAction = parsedJson.actions.find((obj) => obj.name === actionName);
|
|
193
|
+
|
|
194
|
+
// if the method was not found - should never happen but...
|
|
195
|
+
if (!currentMethodAction) {
|
|
196
|
+
throw Error('Can\'t find an action for this method in the provided entity.');
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// if there is a response object, we want to replace the Response object. Otherwise we'll create one.
|
|
200
|
+
const actionResponseObj = currentMethodAction.responseObjects.find((obj) => obj.type === descriptor);
|
|
201
|
+
|
|
202
|
+
// Add the action responseObj back into the array of response objects.
|
|
203
|
+
if (!actionResponseObj) {
|
|
204
|
+
// if there is a default response object, we want to get the key.
|
|
205
|
+
const defaultResponseObj = currentMethodAction.responseObjects.find((obj) => obj.type === 'default');
|
|
206
|
+
|
|
207
|
+
// save the default key into the new response object
|
|
208
|
+
if (defaultResponseObj) {
|
|
209
|
+
responseObj.key = defaultResponseObj.key;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// save the new response object
|
|
213
|
+
currentMethodAction.responseObjects = [responseObj];
|
|
214
|
+
} else {
|
|
215
|
+
// update the location of the mock data file
|
|
216
|
+
actionResponseObj.mockFile = responseObj.mockFile;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
// Save results
|
|
220
|
+
fs.writeFile(`${base}action.json`, JSON.stringify(parsedJson, null, 2), (err) => {
|
|
221
|
+
if (err) throw err;
|
|
222
|
+
});
|
|
223
|
+
});
|
|
224
|
+
});
|
|
225
|
+
} catch (e) {
|
|
226
|
+
log.debug(`Failed to save mock data for ${actionName}. ${e.message}`);
|
|
227
|
+
return false;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
// no response to save
|
|
232
|
+
log.debug(`No data passed to save into mockdata for ${actionName}`);
|
|
233
|
+
return false;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
// require the adapter that we are going to be using
|
|
237
|
+
const BeyondTrust = require('../../adapter');
|
|
238
|
+
|
|
239
|
+
// begin the testing - these should be pretty well defined between the describe and the it!
|
|
240
|
+
describe('[integration] Beyond_trust Adapter Test', () => {
|
|
241
|
+
describe('BeyondTrust Class Tests', () => {
|
|
242
|
+
const a = new BeyondTrust(
|
|
243
|
+
pronghornProps.adapterProps.adapters[0].id,
|
|
244
|
+
pronghornProps.adapterProps.adapters[0].properties
|
|
245
|
+
);
|
|
246
|
+
|
|
247
|
+
if (isRapidFail) {
|
|
248
|
+
const state = {};
|
|
249
|
+
state.passed = true;
|
|
250
|
+
|
|
251
|
+
mocha.afterEach(function x() {
|
|
252
|
+
state.passed = state.passed
|
|
253
|
+
&& (this.currentTest.state === 'passed');
|
|
254
|
+
});
|
|
255
|
+
mocha.beforeEach(function x() {
|
|
256
|
+
if (!state.passed) {
|
|
257
|
+
return this.currentTest.skip();
|
|
258
|
+
}
|
|
259
|
+
return true;
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
describe('#class instance created', () => {
|
|
264
|
+
it('should be a class with properties', (done) => {
|
|
265
|
+
try {
|
|
266
|
+
assert.notEqual(null, a);
|
|
267
|
+
assert.notEqual(undefined, a);
|
|
268
|
+
const checkId = global.pronghornProps.adapterProps.adapters[0].id;
|
|
269
|
+
assert.equal(checkId, a.id);
|
|
270
|
+
assert.notEqual(null, a.allProps);
|
|
271
|
+
const check = global.pronghornProps.adapterProps.adapters[0].properties.healthcheck.type;
|
|
272
|
+
assert.equal(check, a.healthcheckType);
|
|
273
|
+
done();
|
|
274
|
+
} catch (error) {
|
|
275
|
+
log.error(`Test Failure: ${error}`);
|
|
276
|
+
done(error);
|
|
277
|
+
}
|
|
278
|
+
}).timeout(attemptTimeout);
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
describe('#connect', () => {
|
|
282
|
+
it('should get connected - no healthcheck', (done) => {
|
|
283
|
+
try {
|
|
284
|
+
a.healthcheckType = 'none';
|
|
285
|
+
a.connect();
|
|
286
|
+
|
|
287
|
+
try {
|
|
288
|
+
assert.equal(true, a.alive);
|
|
289
|
+
done();
|
|
290
|
+
} catch (error) {
|
|
291
|
+
log.error(`Test Failure: ${error}`);
|
|
292
|
+
done(error);
|
|
293
|
+
}
|
|
294
|
+
} catch (error) {
|
|
295
|
+
log.error(`Adapter Exception: ${error}`);
|
|
296
|
+
done(error);
|
|
297
|
+
}
|
|
298
|
+
});
|
|
299
|
+
it('should get connected - startup healthcheck', (done) => {
|
|
300
|
+
try {
|
|
301
|
+
a.healthcheckType = 'startup';
|
|
302
|
+
a.connect();
|
|
303
|
+
|
|
304
|
+
try {
|
|
305
|
+
assert.equal(true, a.alive);
|
|
306
|
+
done();
|
|
307
|
+
} catch (error) {
|
|
308
|
+
log.error(`Test Failure: ${error}`);
|
|
309
|
+
done(error);
|
|
310
|
+
}
|
|
311
|
+
} catch (error) {
|
|
312
|
+
log.error(`Adapter Exception: ${error}`);
|
|
313
|
+
done(error);
|
|
314
|
+
}
|
|
315
|
+
});
|
|
316
|
+
});
|
|
317
|
+
|
|
318
|
+
describe('#healthCheck', () => {
|
|
319
|
+
it('should be healthy', (done) => {
|
|
320
|
+
try {
|
|
321
|
+
a.healthCheck(null, (data) => {
|
|
322
|
+
try {
|
|
323
|
+
assert.equal(true, a.healthy);
|
|
324
|
+
saveMockData('system', 'healthcheck', 'default', data);
|
|
325
|
+
done();
|
|
326
|
+
} catch (err) {
|
|
327
|
+
log.error(`Test Failure: ${err}`);
|
|
328
|
+
done(err);
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
} catch (error) {
|
|
332
|
+
log.error(`Adapter Exception: ${error}`);
|
|
333
|
+
done(error);
|
|
334
|
+
}
|
|
335
|
+
}).timeout(attemptTimeout);
|
|
336
|
+
});
|
|
337
|
+
|
|
338
|
+
// broker tests
|
|
339
|
+
describe('#getDevicesFiltered - errors', () => {
|
|
340
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
341
|
+
try {
|
|
342
|
+
const opts = {
|
|
343
|
+
filter: {
|
|
344
|
+
name: 'deviceName'
|
|
345
|
+
}
|
|
346
|
+
};
|
|
347
|
+
a.getDevicesFiltered(opts, (data, error) => {
|
|
348
|
+
try {
|
|
349
|
+
if (stub) {
|
|
350
|
+
if (samProps.devicebroker.getDevicesFiltered[0].handleFailure === 'ignore') {
|
|
351
|
+
assert.equal(null, error);
|
|
352
|
+
assert.notEqual(undefined, data);
|
|
353
|
+
assert.notEqual(null, data);
|
|
354
|
+
assert.equal(0, data.total);
|
|
355
|
+
assert.equal(0, data.list.length);
|
|
356
|
+
} else {
|
|
357
|
+
const displayE = 'Error 400 received on request';
|
|
358
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
359
|
+
}
|
|
360
|
+
} else {
|
|
361
|
+
runCommonAsserts(data, error);
|
|
362
|
+
}
|
|
363
|
+
done();
|
|
364
|
+
} catch (err) {
|
|
365
|
+
log.error(`Test Failure: ${err}`);
|
|
366
|
+
done(err);
|
|
367
|
+
}
|
|
368
|
+
});
|
|
369
|
+
} catch (error) {
|
|
370
|
+
log.error(`Adapter Exception: ${error}`);
|
|
371
|
+
done(error);
|
|
372
|
+
}
|
|
373
|
+
}).timeout(attemptTimeout);
|
|
374
|
+
});
|
|
375
|
+
|
|
376
|
+
describe('#iapGetDeviceCount - errors', () => {
|
|
377
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
378
|
+
try {
|
|
379
|
+
const opts = {
|
|
380
|
+
filter: {
|
|
381
|
+
name: 'deviceName'
|
|
382
|
+
}
|
|
383
|
+
};
|
|
384
|
+
a.iapGetDeviceCount((data, error) => {
|
|
385
|
+
try {
|
|
386
|
+
if (stub) {
|
|
387
|
+
if (samProps.devicebroker.getDevicesFiltered[0].handleFailure === 'ignore') {
|
|
388
|
+
assert.equal(null, error);
|
|
389
|
+
assert.notEqual(undefined, data);
|
|
390
|
+
assert.notEqual(null, data);
|
|
391
|
+
assert.equal(0, data.count);
|
|
392
|
+
} else {
|
|
393
|
+
const displayE = 'Error 400 received on request';
|
|
394
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
395
|
+
}
|
|
396
|
+
} else {
|
|
397
|
+
runCommonAsserts(data, error);
|
|
398
|
+
}
|
|
399
|
+
done();
|
|
400
|
+
} catch (err) {
|
|
401
|
+
log.error(`Test Failure: ${err}`);
|
|
402
|
+
done(err);
|
|
403
|
+
}
|
|
404
|
+
});
|
|
405
|
+
} catch (error) {
|
|
406
|
+
log.error(`Adapter Exception: ${error}`);
|
|
407
|
+
done(error);
|
|
408
|
+
}
|
|
409
|
+
}).timeout(attemptTimeout);
|
|
410
|
+
});
|
|
411
|
+
|
|
412
|
+
// exposed cache tests
|
|
413
|
+
describe('#iapPopulateEntityCache - errors', () => {
|
|
414
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
415
|
+
try {
|
|
416
|
+
a.iapPopulateEntityCache('Device', (data, error) => {
|
|
417
|
+
try {
|
|
418
|
+
if (stub) {
|
|
419
|
+
assert.equal(null, data);
|
|
420
|
+
assert.notEqual(undefined, error);
|
|
421
|
+
assert.notEqual(null, error);
|
|
422
|
+
done();
|
|
423
|
+
} else {
|
|
424
|
+
assert.equal(undefined, error);
|
|
425
|
+
assert.equal('success', data[0]);
|
|
426
|
+
done();
|
|
427
|
+
}
|
|
428
|
+
} catch (err) {
|
|
429
|
+
log.error(`Test Failure: ${err}`);
|
|
430
|
+
done(err);
|
|
431
|
+
}
|
|
432
|
+
});
|
|
433
|
+
} catch (error) {
|
|
434
|
+
log.error(`Adapter Exception: ${error}`);
|
|
435
|
+
done(error);
|
|
436
|
+
}
|
|
437
|
+
}).timeout(attemptTimeout);
|
|
438
|
+
});
|
|
439
|
+
|
|
440
|
+
describe('#iapRetrieveEntitiesCache - errors', () => {
|
|
441
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
442
|
+
try {
|
|
443
|
+
a.iapRetrieveEntitiesCache('Device', {}, (data, error) => {
|
|
444
|
+
try {
|
|
445
|
+
if (stub) {
|
|
446
|
+
assert.equal(null, data);
|
|
447
|
+
assert.notEqual(null, error);
|
|
448
|
+
assert.notEqual(undefined, error);
|
|
449
|
+
} else {
|
|
450
|
+
assert.equal(undefined, error);
|
|
451
|
+
assert.notEqual(null, data);
|
|
452
|
+
assert.notEqual(undefined, data);
|
|
453
|
+
}
|
|
454
|
+
done();
|
|
455
|
+
} catch (err) {
|
|
456
|
+
log.error(`Test Failure: ${err}`);
|
|
457
|
+
done(err);
|
|
458
|
+
}
|
|
459
|
+
});
|
|
460
|
+
} catch (error) {
|
|
461
|
+
log.error(`Adapter Exception: ${error}`);
|
|
462
|
+
done(error);
|
|
463
|
+
}
|
|
464
|
+
}).timeout(attemptTimeout);
|
|
465
|
+
});
|
|
466
|
+
/*
|
|
467
|
+
-----------------------------------------------------------------------
|
|
468
|
+
-----------------------------------------------------------------------
|
|
469
|
+
*** All code above this comment will be replaced during a migration ***
|
|
470
|
+
******************* DO NOT REMOVE THIS COMMENT BLOCK ******************
|
|
471
|
+
-----------------------------------------------------------------------
|
|
472
|
+
-----------------------------------------------------------------------
|
|
473
|
+
*/
|
|
474
|
+
|
|
475
|
+
const jumpClientApiConfigJumpClientCreateInstallerBodyParam = {};
|
|
476
|
+
describe('#apiConfigJumpClientCreateInstaller - errors', () => {
|
|
477
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
478
|
+
try {
|
|
479
|
+
a.apiConfigJumpClientCreateInstaller(jumpClientApiConfigJumpClientCreateInstallerBodyParam, (data, error) => {
|
|
480
|
+
try {
|
|
481
|
+
if (stub) {
|
|
482
|
+
const displayE = 'Error 400 received on request';
|
|
483
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
484
|
+
} else {
|
|
485
|
+
runCommonAsserts(data, error);
|
|
486
|
+
}
|
|
487
|
+
saveMockData('JumpClient', 'apiConfigJumpClientCreateInstaller', 'default', data);
|
|
488
|
+
done();
|
|
489
|
+
} catch (err) {
|
|
490
|
+
log.error(`Test Failure: ${err}`);
|
|
491
|
+
done(err);
|
|
492
|
+
}
|
|
493
|
+
});
|
|
494
|
+
} catch (error) {
|
|
495
|
+
log.error(`Adapter Exception: ${error}`);
|
|
496
|
+
done(error);
|
|
497
|
+
}
|
|
498
|
+
}).timeout(attemptTimeout);
|
|
499
|
+
});
|
|
500
|
+
|
|
501
|
+
const jumpClientId = 555;
|
|
502
|
+
const jumpClientApiConfigJumpClientCopyBodyParam = {
|
|
503
|
+
jump_group_id: 8,
|
|
504
|
+
jump_group_type: null
|
|
505
|
+
};
|
|
506
|
+
describe('#apiConfigJumpClientCopy - errors', () => {
|
|
507
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
508
|
+
try {
|
|
509
|
+
a.apiConfigJumpClientCopy(jumpClientId, jumpClientApiConfigJumpClientCopyBodyParam, (data, error) => {
|
|
510
|
+
try {
|
|
511
|
+
if (stub) {
|
|
512
|
+
const displayE = 'Error 400 received on request';
|
|
513
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
514
|
+
} else {
|
|
515
|
+
runCommonAsserts(data, error);
|
|
516
|
+
}
|
|
517
|
+
saveMockData('JumpClient', 'apiConfigJumpClientCopy', 'default', data);
|
|
518
|
+
done();
|
|
519
|
+
} catch (err) {
|
|
520
|
+
log.error(`Test Failure: ${err}`);
|
|
521
|
+
done(err);
|
|
522
|
+
}
|
|
523
|
+
});
|
|
524
|
+
} catch (error) {
|
|
525
|
+
log.error(`Adapter Exception: ${error}`);
|
|
526
|
+
done(error);
|
|
527
|
+
}
|
|
528
|
+
}).timeout(attemptTimeout);
|
|
529
|
+
});
|
|
530
|
+
|
|
531
|
+
describe('#apiConfigJumpClientIndex - errors', () => {
|
|
532
|
+
it('should work if integrated or standalone with mockdata', (done) => {
|
|
533
|
+
try {
|
|
534
|
+
a.apiConfigJumpClientIndex(null, null, null, null, null, null, null, null, null, null, null, null, (data, error) => {
|
|
535
|
+
try {
|
|
536
|
+
if (stub) {
|
|
537
|
+
runCommonAsserts(data, error);
|
|
538
|
+
assert.equal('object', typeof data.response[0]);
|
|
539
|
+
} else {
|
|
540
|
+
runCommonAsserts(data, error);
|
|
541
|
+
}
|
|
542
|
+
saveMockData('JumpClient', 'apiConfigJumpClientIndex', 'default', data);
|
|
543
|
+
done();
|
|
544
|
+
} catch (err) {
|
|
545
|
+
log.error(`Test Failure: ${err}`);
|
|
546
|
+
done(err);
|
|
547
|
+
}
|
|
548
|
+
});
|
|
549
|
+
} catch (error) {
|
|
550
|
+
log.error(`Adapter Exception: ${error}`);
|
|
551
|
+
done(error);
|
|
552
|
+
}
|
|
553
|
+
}).timeout(attemptTimeout);
|
|
554
|
+
});
|
|
555
|
+
|
|
556
|
+
const jumpClientInstallerId = 'fakedata';
|
|
557
|
+
const jumpClientPlatform = 'fakedata';
|
|
558
|
+
describe('#apiConfigJumpClientDownload - errors', () => {
|
|
559
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
560
|
+
try {
|
|
561
|
+
a.apiConfigJumpClientDownload(jumpClientInstallerId, jumpClientPlatform, (data, error) => {
|
|
562
|
+
try {
|
|
563
|
+
if (stub) {
|
|
564
|
+
const displayE = 'Error 400 received on request';
|
|
565
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
566
|
+
} else {
|
|
567
|
+
runCommonAsserts(data, error);
|
|
568
|
+
}
|
|
569
|
+
saveMockData('JumpClient', 'apiConfigJumpClientDownload', 'default', data);
|
|
570
|
+
done();
|
|
571
|
+
} catch (err) {
|
|
572
|
+
log.error(`Test Failure: ${err}`);
|
|
573
|
+
done(err);
|
|
574
|
+
}
|
|
575
|
+
});
|
|
576
|
+
} catch (error) {
|
|
577
|
+
log.error(`Adapter Exception: ${error}`);
|
|
578
|
+
done(error);
|
|
579
|
+
}
|
|
580
|
+
}).timeout(attemptTimeout);
|
|
581
|
+
});
|
|
582
|
+
|
|
583
|
+
const jumpClientApiConfigJumpClientUpdateBodyParam = {};
|
|
584
|
+
describe('#apiConfigJumpClientUpdate - errors', () => {
|
|
585
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
586
|
+
try {
|
|
587
|
+
a.apiConfigJumpClientUpdate(jumpClientId, jumpClientApiConfigJumpClientUpdateBodyParam, (data, error) => {
|
|
588
|
+
try {
|
|
589
|
+
if (stub) {
|
|
590
|
+
const displayE = 'Error 400 received on request';
|
|
591
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
592
|
+
} else {
|
|
593
|
+
runCommonAsserts(data, error);
|
|
594
|
+
}
|
|
595
|
+
saveMockData('JumpClient', 'apiConfigJumpClientUpdate', 'default', data);
|
|
596
|
+
done();
|
|
597
|
+
} catch (err) {
|
|
598
|
+
log.error(`Test Failure: ${err}`);
|
|
599
|
+
done(err);
|
|
600
|
+
}
|
|
601
|
+
});
|
|
602
|
+
} catch (error) {
|
|
603
|
+
log.error(`Adapter Exception: ${error}`);
|
|
604
|
+
done(error);
|
|
605
|
+
}
|
|
606
|
+
}).timeout(attemptTimeout);
|
|
607
|
+
});
|
|
608
|
+
|
|
609
|
+
describe('#apiConfigJumpClientShow - errors', () => {
|
|
610
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
611
|
+
try {
|
|
612
|
+
a.apiConfigJumpClientShow(jumpClientId, (data, error) => {
|
|
613
|
+
try {
|
|
614
|
+
if (stub) {
|
|
615
|
+
const displayE = 'Error 400 received on request';
|
|
616
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
617
|
+
} else {
|
|
618
|
+
runCommonAsserts(data, error);
|
|
619
|
+
}
|
|
620
|
+
saveMockData('JumpClient', 'apiConfigJumpClientShow', 'default', data);
|
|
621
|
+
done();
|
|
622
|
+
} catch (err) {
|
|
623
|
+
log.error(`Test Failure: ${err}`);
|
|
624
|
+
done(err);
|
|
625
|
+
}
|
|
626
|
+
});
|
|
627
|
+
} catch (error) {
|
|
628
|
+
log.error(`Adapter Exception: ${error}`);
|
|
629
|
+
done(error);
|
|
630
|
+
}
|
|
631
|
+
}).timeout(attemptTimeout);
|
|
632
|
+
});
|
|
633
|
+
|
|
634
|
+
describe('#apiConfigJumpItemRoleIndex - errors', () => {
|
|
635
|
+
it('should work if integrated or standalone with mockdata', (done) => {
|
|
636
|
+
try {
|
|
637
|
+
a.apiConfigJumpItemRoleIndex(null, null, null, (data, error) => {
|
|
638
|
+
try {
|
|
639
|
+
if (stub) {
|
|
640
|
+
runCommonAsserts(data, error);
|
|
641
|
+
assert.equal('object', typeof data.response[0]);
|
|
642
|
+
assert.equal('object', typeof data.response[1]);
|
|
643
|
+
} else {
|
|
644
|
+
runCommonAsserts(data, error);
|
|
645
|
+
}
|
|
646
|
+
saveMockData('JumpItemRole', 'apiConfigJumpItemRoleIndex', 'default', data);
|
|
647
|
+
done();
|
|
648
|
+
} catch (err) {
|
|
649
|
+
log.error(`Test Failure: ${err}`);
|
|
650
|
+
done(err);
|
|
651
|
+
}
|
|
652
|
+
});
|
|
653
|
+
} catch (error) {
|
|
654
|
+
log.error(`Adapter Exception: ${error}`);
|
|
655
|
+
done(error);
|
|
656
|
+
}
|
|
657
|
+
}).timeout(attemptTimeout);
|
|
658
|
+
});
|
|
659
|
+
|
|
660
|
+
const jumpItemRoleId = 555;
|
|
661
|
+
describe('#apiConfigJumpItemRoleShow - errors', () => {
|
|
662
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
663
|
+
try {
|
|
664
|
+
a.apiConfigJumpItemRoleShow(jumpItemRoleId, (data, error) => {
|
|
665
|
+
try {
|
|
666
|
+
if (stub) {
|
|
667
|
+
const displayE = 'Error 400 received on request';
|
|
668
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
669
|
+
} else {
|
|
670
|
+
runCommonAsserts(data, error);
|
|
671
|
+
}
|
|
672
|
+
saveMockData('JumpItemRole', 'apiConfigJumpItemRoleShow', 'default', data);
|
|
673
|
+
done();
|
|
674
|
+
} catch (err) {
|
|
675
|
+
log.error(`Test Failure: ${err}`);
|
|
676
|
+
done(err);
|
|
677
|
+
}
|
|
678
|
+
});
|
|
679
|
+
} catch (error) {
|
|
680
|
+
log.error(`Adapter Exception: ${error}`);
|
|
681
|
+
done(error);
|
|
682
|
+
}
|
|
683
|
+
}).timeout(attemptTimeout);
|
|
684
|
+
});
|
|
685
|
+
|
|
686
|
+
const jumpItemApiConfigJumpItemRemoteRdpStoreBodyParam = {};
|
|
687
|
+
describe('#apiConfigJumpItemRemoteRdpStore - errors', () => {
|
|
688
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
689
|
+
try {
|
|
690
|
+
a.apiConfigJumpItemRemoteRdpStore(jumpItemApiConfigJumpItemRemoteRdpStoreBodyParam, (data, error) => {
|
|
691
|
+
try {
|
|
692
|
+
if (stub) {
|
|
693
|
+
const displayE = 'Error 400 received on request';
|
|
694
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
695
|
+
} else {
|
|
696
|
+
runCommonAsserts(data, error);
|
|
697
|
+
}
|
|
698
|
+
saveMockData('JumpItem', 'apiConfigJumpItemRemoteRdpStore', 'default', data);
|
|
699
|
+
done();
|
|
700
|
+
} catch (err) {
|
|
701
|
+
log.error(`Test Failure: ${err}`);
|
|
702
|
+
done(err);
|
|
703
|
+
}
|
|
704
|
+
});
|
|
705
|
+
} catch (error) {
|
|
706
|
+
log.error(`Adapter Exception: ${error}`);
|
|
707
|
+
done(error);
|
|
708
|
+
}
|
|
709
|
+
}).timeout(attemptTimeout);
|
|
710
|
+
});
|
|
711
|
+
|
|
712
|
+
const jumpItemId = 555;
|
|
713
|
+
const jumpItemApiConfigJumpItemRemoteRdpCopyBodyParam = {
|
|
714
|
+
jump_group_id: 1,
|
|
715
|
+
jump_group_type: null
|
|
716
|
+
};
|
|
717
|
+
describe('#apiConfigJumpItemRemoteRdpCopy - errors', () => {
|
|
718
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
719
|
+
try {
|
|
720
|
+
a.apiConfigJumpItemRemoteRdpCopy(jumpItemId, jumpItemApiConfigJumpItemRemoteRdpCopyBodyParam, (data, error) => {
|
|
721
|
+
try {
|
|
722
|
+
if (stub) {
|
|
723
|
+
const displayE = 'Error 400 received on request';
|
|
724
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
725
|
+
} else {
|
|
726
|
+
runCommonAsserts(data, error);
|
|
727
|
+
}
|
|
728
|
+
saveMockData('JumpItem', 'apiConfigJumpItemRemoteRdpCopy', 'default', data);
|
|
729
|
+
done();
|
|
730
|
+
} catch (err) {
|
|
731
|
+
log.error(`Test Failure: ${err}`);
|
|
732
|
+
done(err);
|
|
733
|
+
}
|
|
734
|
+
});
|
|
735
|
+
} catch (error) {
|
|
736
|
+
log.error(`Adapter Exception: ${error}`);
|
|
737
|
+
done(error);
|
|
738
|
+
}
|
|
739
|
+
}).timeout(attemptTimeout);
|
|
740
|
+
});
|
|
741
|
+
|
|
742
|
+
const jumpItemApiConfigJumpItemShellJumpStoreBodyParam = {
|
|
743
|
+
name: 'string',
|
|
744
|
+
jumpoint_id: 5,
|
|
745
|
+
hostname: 'string',
|
|
746
|
+
protocol: 'telnet',
|
|
747
|
+
jump_group_id: 3
|
|
748
|
+
};
|
|
749
|
+
describe('#apiConfigJumpItemShellJumpStore - errors', () => {
|
|
750
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
751
|
+
try {
|
|
752
|
+
a.apiConfigJumpItemShellJumpStore(jumpItemApiConfigJumpItemShellJumpStoreBodyParam, (data, error) => {
|
|
753
|
+
try {
|
|
754
|
+
if (stub) {
|
|
755
|
+
const displayE = 'Error 400 received on request';
|
|
756
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
757
|
+
} else {
|
|
758
|
+
runCommonAsserts(data, error);
|
|
759
|
+
}
|
|
760
|
+
saveMockData('JumpItem', 'apiConfigJumpItemShellJumpStore', 'default', data);
|
|
761
|
+
done();
|
|
762
|
+
} catch (err) {
|
|
763
|
+
log.error(`Test Failure: ${err}`);
|
|
764
|
+
done(err);
|
|
765
|
+
}
|
|
766
|
+
});
|
|
767
|
+
} catch (error) {
|
|
768
|
+
log.error(`Adapter Exception: ${error}`);
|
|
769
|
+
done(error);
|
|
770
|
+
}
|
|
771
|
+
}).timeout(attemptTimeout);
|
|
772
|
+
});
|
|
773
|
+
|
|
774
|
+
const jumpItemApiConfigJumpItemShellJumpCopyBodyParam = {
|
|
775
|
+
jump_group_id: 9,
|
|
776
|
+
jump_group_type: null
|
|
777
|
+
};
|
|
778
|
+
describe('#apiConfigJumpItemShellJumpCopy - errors', () => {
|
|
779
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
780
|
+
try {
|
|
781
|
+
a.apiConfigJumpItemShellJumpCopy(jumpItemId, jumpItemApiConfigJumpItemShellJumpCopyBodyParam, (data, error) => {
|
|
782
|
+
try {
|
|
783
|
+
if (stub) {
|
|
784
|
+
const displayE = 'Error 400 received on request';
|
|
785
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
786
|
+
} else {
|
|
787
|
+
runCommonAsserts(data, error);
|
|
788
|
+
}
|
|
789
|
+
saveMockData('JumpItem', 'apiConfigJumpItemShellJumpCopy', 'default', data);
|
|
790
|
+
done();
|
|
791
|
+
} catch (err) {
|
|
792
|
+
log.error(`Test Failure: ${err}`);
|
|
793
|
+
done(err);
|
|
794
|
+
}
|
|
795
|
+
});
|
|
796
|
+
} catch (error) {
|
|
797
|
+
log.error(`Adapter Exception: ${error}`);
|
|
798
|
+
done(error);
|
|
799
|
+
}
|
|
800
|
+
}).timeout(attemptTimeout);
|
|
801
|
+
});
|
|
802
|
+
|
|
803
|
+
const jumpItemApiConfigJumpItemWebJumpStoreBodyParam = {
|
|
804
|
+
name: 'string',
|
|
805
|
+
jumpoint_id: 1,
|
|
806
|
+
url: 'string',
|
|
807
|
+
jump_group_id: 7
|
|
808
|
+
};
|
|
809
|
+
describe('#apiConfigJumpItemWebJumpStore - errors', () => {
|
|
810
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
811
|
+
try {
|
|
812
|
+
a.apiConfigJumpItemWebJumpStore(jumpItemApiConfigJumpItemWebJumpStoreBodyParam, (data, error) => {
|
|
813
|
+
try {
|
|
814
|
+
if (stub) {
|
|
815
|
+
const displayE = 'Error 400 received on request';
|
|
816
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
817
|
+
} else {
|
|
818
|
+
runCommonAsserts(data, error);
|
|
819
|
+
}
|
|
820
|
+
saveMockData('JumpItem', 'apiConfigJumpItemWebJumpStore', 'default', data);
|
|
821
|
+
done();
|
|
822
|
+
} catch (err) {
|
|
823
|
+
log.error(`Test Failure: ${err}`);
|
|
824
|
+
done(err);
|
|
825
|
+
}
|
|
826
|
+
});
|
|
827
|
+
} catch (error) {
|
|
828
|
+
log.error(`Adapter Exception: ${error}`);
|
|
829
|
+
done(error);
|
|
830
|
+
}
|
|
831
|
+
}).timeout(attemptTimeout);
|
|
832
|
+
});
|
|
833
|
+
|
|
834
|
+
const jumpItemApiConfigJumpItemWebJumpCopyBodyParam = {
|
|
835
|
+
jump_group_id: 9,
|
|
836
|
+
jump_group_type: null
|
|
837
|
+
};
|
|
838
|
+
describe('#apiConfigJumpItemWebJumpCopy - errors', () => {
|
|
839
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
840
|
+
try {
|
|
841
|
+
a.apiConfigJumpItemWebJumpCopy(jumpItemId, jumpItemApiConfigJumpItemWebJumpCopyBodyParam, (data, error) => {
|
|
842
|
+
try {
|
|
843
|
+
if (stub) {
|
|
844
|
+
const displayE = 'Error 400 received on request';
|
|
845
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
846
|
+
} else {
|
|
847
|
+
runCommonAsserts(data, error);
|
|
848
|
+
}
|
|
849
|
+
saveMockData('JumpItem', 'apiConfigJumpItemWebJumpCopy', 'default', data);
|
|
850
|
+
done();
|
|
851
|
+
} catch (err) {
|
|
852
|
+
log.error(`Test Failure: ${err}`);
|
|
853
|
+
done(err);
|
|
854
|
+
}
|
|
855
|
+
});
|
|
856
|
+
} catch (error) {
|
|
857
|
+
log.error(`Adapter Exception: ${error}`);
|
|
858
|
+
done(error);
|
|
859
|
+
}
|
|
860
|
+
}).timeout(attemptTimeout);
|
|
861
|
+
});
|
|
862
|
+
|
|
863
|
+
describe('#apiConfigJumpItemRemoteRdpIndex - errors', () => {
|
|
864
|
+
it('should work if integrated or standalone with mockdata', (done) => {
|
|
865
|
+
try {
|
|
866
|
+
a.apiConfigJumpItemRemoteRdpIndex(null, null, null, null, null, null, null, (data, error) => {
|
|
867
|
+
try {
|
|
868
|
+
if (stub) {
|
|
869
|
+
runCommonAsserts(data, error);
|
|
870
|
+
assert.equal('object', typeof data.response[0]);
|
|
871
|
+
assert.equal('object', typeof data.response[1]);
|
|
872
|
+
} else {
|
|
873
|
+
runCommonAsserts(data, error);
|
|
874
|
+
}
|
|
875
|
+
saveMockData('JumpItem', 'apiConfigJumpItemRemoteRdpIndex', 'default', data);
|
|
876
|
+
done();
|
|
877
|
+
} catch (err) {
|
|
878
|
+
log.error(`Test Failure: ${err}`);
|
|
879
|
+
done(err);
|
|
880
|
+
}
|
|
881
|
+
});
|
|
882
|
+
} catch (error) {
|
|
883
|
+
log.error(`Adapter Exception: ${error}`);
|
|
884
|
+
done(error);
|
|
885
|
+
}
|
|
886
|
+
}).timeout(attemptTimeout);
|
|
887
|
+
});
|
|
888
|
+
|
|
889
|
+
const jumpItemApiConfigJumpItemRemoteRdpUpdateBodyParam = {};
|
|
890
|
+
describe('#apiConfigJumpItemRemoteRdpUpdate - errors', () => {
|
|
891
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
892
|
+
try {
|
|
893
|
+
a.apiConfigJumpItemRemoteRdpUpdate(jumpItemId, jumpItemApiConfigJumpItemRemoteRdpUpdateBodyParam, (data, error) => {
|
|
894
|
+
try {
|
|
895
|
+
if (stub) {
|
|
896
|
+
const displayE = 'Error 400 received on request';
|
|
897
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
898
|
+
} else {
|
|
899
|
+
runCommonAsserts(data, error);
|
|
900
|
+
}
|
|
901
|
+
saveMockData('JumpItem', 'apiConfigJumpItemRemoteRdpUpdate', 'default', data);
|
|
902
|
+
done();
|
|
903
|
+
} catch (err) {
|
|
904
|
+
log.error(`Test Failure: ${err}`);
|
|
905
|
+
done(err);
|
|
906
|
+
}
|
|
907
|
+
});
|
|
908
|
+
} catch (error) {
|
|
909
|
+
log.error(`Adapter Exception: ${error}`);
|
|
910
|
+
done(error);
|
|
911
|
+
}
|
|
912
|
+
}).timeout(attemptTimeout);
|
|
913
|
+
});
|
|
914
|
+
|
|
915
|
+
describe('#apiConfigJumpItemRemoteRdpShow - errors', () => {
|
|
916
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
917
|
+
try {
|
|
918
|
+
a.apiConfigJumpItemRemoteRdpShow(jumpItemId, (data, error) => {
|
|
919
|
+
try {
|
|
920
|
+
if (stub) {
|
|
921
|
+
const displayE = 'Error 400 received on request';
|
|
922
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
923
|
+
} else {
|
|
924
|
+
runCommonAsserts(data, error);
|
|
925
|
+
}
|
|
926
|
+
saveMockData('JumpItem', 'apiConfigJumpItemRemoteRdpShow', 'default', data);
|
|
927
|
+
done();
|
|
928
|
+
} catch (err) {
|
|
929
|
+
log.error(`Test Failure: ${err}`);
|
|
930
|
+
done(err);
|
|
931
|
+
}
|
|
932
|
+
});
|
|
933
|
+
} catch (error) {
|
|
934
|
+
log.error(`Adapter Exception: ${error}`);
|
|
935
|
+
done(error);
|
|
936
|
+
}
|
|
937
|
+
}).timeout(attemptTimeout);
|
|
938
|
+
});
|
|
939
|
+
|
|
940
|
+
describe('#apiConfigJumpItemShellJumpIndex - errors', () => {
|
|
941
|
+
it('should work if integrated or standalone with mockdata', (done) => {
|
|
942
|
+
try {
|
|
943
|
+
a.apiConfigJumpItemShellJumpIndex(null, null, null, null, null, null, null, (data, error) => {
|
|
944
|
+
try {
|
|
945
|
+
if (stub) {
|
|
946
|
+
runCommonAsserts(data, error);
|
|
947
|
+
assert.equal('object', typeof data.response[0]);
|
|
948
|
+
assert.equal('object', typeof data.response[1]);
|
|
949
|
+
assert.equal('object', typeof data.response[2]);
|
|
950
|
+
assert.equal('object', typeof data.response[3]);
|
|
951
|
+
} else {
|
|
952
|
+
runCommonAsserts(data, error);
|
|
953
|
+
}
|
|
954
|
+
saveMockData('JumpItem', 'apiConfigJumpItemShellJumpIndex', 'default', data);
|
|
955
|
+
done();
|
|
956
|
+
} catch (err) {
|
|
957
|
+
log.error(`Test Failure: ${err}`);
|
|
958
|
+
done(err);
|
|
959
|
+
}
|
|
960
|
+
});
|
|
961
|
+
} catch (error) {
|
|
962
|
+
log.error(`Adapter Exception: ${error}`);
|
|
963
|
+
done(error);
|
|
964
|
+
}
|
|
965
|
+
}).timeout(attemptTimeout);
|
|
966
|
+
});
|
|
967
|
+
|
|
968
|
+
const jumpItemApiConfigJumpItemShellJumpUpdateBodyParam = {};
|
|
969
|
+
describe('#apiConfigJumpItemShellJumpUpdate - errors', () => {
|
|
970
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
971
|
+
try {
|
|
972
|
+
a.apiConfigJumpItemShellJumpUpdate(jumpItemId, jumpItemApiConfigJumpItemShellJumpUpdateBodyParam, (data, error) => {
|
|
973
|
+
try {
|
|
974
|
+
if (stub) {
|
|
975
|
+
const displayE = 'Error 400 received on request';
|
|
976
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
977
|
+
} else {
|
|
978
|
+
runCommonAsserts(data, error);
|
|
979
|
+
}
|
|
980
|
+
saveMockData('JumpItem', 'apiConfigJumpItemShellJumpUpdate', 'default', data);
|
|
981
|
+
done();
|
|
982
|
+
} catch (err) {
|
|
983
|
+
log.error(`Test Failure: ${err}`);
|
|
984
|
+
done(err);
|
|
985
|
+
}
|
|
986
|
+
});
|
|
987
|
+
} catch (error) {
|
|
988
|
+
log.error(`Adapter Exception: ${error}`);
|
|
989
|
+
done(error);
|
|
990
|
+
}
|
|
991
|
+
}).timeout(attemptTimeout);
|
|
992
|
+
});
|
|
993
|
+
|
|
994
|
+
describe('#apiConfigJumpItemShellJumpShow - errors', () => {
|
|
995
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
996
|
+
try {
|
|
997
|
+
a.apiConfigJumpItemShellJumpShow(jumpItemId, (data, error) => {
|
|
998
|
+
try {
|
|
999
|
+
if (stub) {
|
|
1000
|
+
const displayE = 'Error 400 received on request';
|
|
1001
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
1002
|
+
} else {
|
|
1003
|
+
runCommonAsserts(data, error);
|
|
1004
|
+
}
|
|
1005
|
+
saveMockData('JumpItem', 'apiConfigJumpItemShellJumpShow', 'default', data);
|
|
1006
|
+
done();
|
|
1007
|
+
} catch (err) {
|
|
1008
|
+
log.error(`Test Failure: ${err}`);
|
|
1009
|
+
done(err);
|
|
1010
|
+
}
|
|
1011
|
+
});
|
|
1012
|
+
} catch (error) {
|
|
1013
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1014
|
+
done(error);
|
|
1015
|
+
}
|
|
1016
|
+
}).timeout(attemptTimeout);
|
|
1017
|
+
});
|
|
1018
|
+
|
|
1019
|
+
describe('#apiConfigJumpItemWebJumpIndex - errors', () => {
|
|
1020
|
+
it('should work if integrated or standalone with mockdata', (done) => {
|
|
1021
|
+
try {
|
|
1022
|
+
a.apiConfigJumpItemWebJumpIndex(null, null, null, null, null, null, null, (data, error) => {
|
|
1023
|
+
try {
|
|
1024
|
+
if (stub) {
|
|
1025
|
+
runCommonAsserts(data, error);
|
|
1026
|
+
assert.equal('object', typeof data.response[0]);
|
|
1027
|
+
assert.equal('object', typeof data.response[1]);
|
|
1028
|
+
} else {
|
|
1029
|
+
runCommonAsserts(data, error);
|
|
1030
|
+
}
|
|
1031
|
+
saveMockData('JumpItem', 'apiConfigJumpItemWebJumpIndex', 'default', data);
|
|
1032
|
+
done();
|
|
1033
|
+
} catch (err) {
|
|
1034
|
+
log.error(`Test Failure: ${err}`);
|
|
1035
|
+
done(err);
|
|
1036
|
+
}
|
|
1037
|
+
});
|
|
1038
|
+
} catch (error) {
|
|
1039
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1040
|
+
done(error);
|
|
1041
|
+
}
|
|
1042
|
+
}).timeout(attemptTimeout);
|
|
1043
|
+
});
|
|
1044
|
+
|
|
1045
|
+
const jumpItemApiConfigJumpItemWebJumpUpdateBodyParam = {};
|
|
1046
|
+
describe('#apiConfigJumpItemWebJumpUpdate - errors', () => {
|
|
1047
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1048
|
+
try {
|
|
1049
|
+
a.apiConfigJumpItemWebJumpUpdate(jumpItemId, jumpItemApiConfigJumpItemWebJumpUpdateBodyParam, (data, error) => {
|
|
1050
|
+
try {
|
|
1051
|
+
if (stub) {
|
|
1052
|
+
const displayE = 'Error 400 received on request';
|
|
1053
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
1054
|
+
} else {
|
|
1055
|
+
runCommonAsserts(data, error);
|
|
1056
|
+
}
|
|
1057
|
+
saveMockData('JumpItem', 'apiConfigJumpItemWebJumpUpdate', 'default', data);
|
|
1058
|
+
done();
|
|
1059
|
+
} catch (err) {
|
|
1060
|
+
log.error(`Test Failure: ${err}`);
|
|
1061
|
+
done(err);
|
|
1062
|
+
}
|
|
1063
|
+
});
|
|
1064
|
+
} catch (error) {
|
|
1065
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1066
|
+
done(error);
|
|
1067
|
+
}
|
|
1068
|
+
}).timeout(attemptTimeout);
|
|
1069
|
+
});
|
|
1070
|
+
|
|
1071
|
+
describe('#apiConfigJumpItemWebJumpShow - errors', () => {
|
|
1072
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1073
|
+
try {
|
|
1074
|
+
a.apiConfigJumpItemWebJumpShow(jumpItemId, (data, error) => {
|
|
1075
|
+
try {
|
|
1076
|
+
if (stub) {
|
|
1077
|
+
const displayE = 'Error 400 received on request';
|
|
1078
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
1079
|
+
} else {
|
|
1080
|
+
runCommonAsserts(data, error);
|
|
1081
|
+
}
|
|
1082
|
+
saveMockData('JumpItem', 'apiConfigJumpItemWebJumpShow', 'default', data);
|
|
1083
|
+
done();
|
|
1084
|
+
} catch (err) {
|
|
1085
|
+
log.error(`Test Failure: ${err}`);
|
|
1086
|
+
done(err);
|
|
1087
|
+
}
|
|
1088
|
+
});
|
|
1089
|
+
} catch (error) {
|
|
1090
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1091
|
+
done(error);
|
|
1092
|
+
}
|
|
1093
|
+
}).timeout(attemptTimeout);
|
|
1094
|
+
});
|
|
1095
|
+
|
|
1096
|
+
const jumpGroupApiConfigJumpGroupStoreBodyParam = {
|
|
1097
|
+
name: 'string'
|
|
1098
|
+
};
|
|
1099
|
+
describe('#apiConfigJumpGroupStore - errors', () => {
|
|
1100
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1101
|
+
try {
|
|
1102
|
+
a.apiConfigJumpGroupStore(jumpGroupApiConfigJumpGroupStoreBodyParam, (data, error) => {
|
|
1103
|
+
try {
|
|
1104
|
+
if (stub) {
|
|
1105
|
+
const displayE = 'Error 400 received on request';
|
|
1106
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
1107
|
+
} else {
|
|
1108
|
+
runCommonAsserts(data, error);
|
|
1109
|
+
}
|
|
1110
|
+
saveMockData('JumpGroup', 'apiConfigJumpGroupStore', 'default', data);
|
|
1111
|
+
done();
|
|
1112
|
+
} catch (err) {
|
|
1113
|
+
log.error(`Test Failure: ${err}`);
|
|
1114
|
+
done(err);
|
|
1115
|
+
}
|
|
1116
|
+
});
|
|
1117
|
+
} catch (error) {
|
|
1118
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1119
|
+
done(error);
|
|
1120
|
+
}
|
|
1121
|
+
}).timeout(attemptTimeout);
|
|
1122
|
+
});
|
|
1123
|
+
|
|
1124
|
+
const jumpGroupId = 555;
|
|
1125
|
+
const jumpGroupApiConfigJumpGroupUserStoreBodyParam = {
|
|
1126
|
+
user_id: 10,
|
|
1127
|
+
jump_item_role_id: 7,
|
|
1128
|
+
jump_policy_id: 1
|
|
1129
|
+
};
|
|
1130
|
+
describe('#apiConfigJumpGroupUserStore - errors', () => {
|
|
1131
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1132
|
+
try {
|
|
1133
|
+
a.apiConfigJumpGroupUserStore(jumpGroupId, jumpGroupApiConfigJumpGroupUserStoreBodyParam, (data, error) => {
|
|
1134
|
+
try {
|
|
1135
|
+
if (stub) {
|
|
1136
|
+
const displayE = 'Error 400 received on request';
|
|
1137
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
1138
|
+
} else {
|
|
1139
|
+
runCommonAsserts(data, error);
|
|
1140
|
+
}
|
|
1141
|
+
saveMockData('JumpGroup', 'apiConfigJumpGroupUserStore', 'default', data);
|
|
1142
|
+
done();
|
|
1143
|
+
} catch (err) {
|
|
1144
|
+
log.error(`Test Failure: ${err}`);
|
|
1145
|
+
done(err);
|
|
1146
|
+
}
|
|
1147
|
+
});
|
|
1148
|
+
} catch (error) {
|
|
1149
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1150
|
+
done(error);
|
|
1151
|
+
}
|
|
1152
|
+
}).timeout(attemptTimeout);
|
|
1153
|
+
});
|
|
1154
|
+
|
|
1155
|
+
describe('#apiConfigJumpGroupIndex - errors', () => {
|
|
1156
|
+
it('should work if integrated or standalone with mockdata', (done) => {
|
|
1157
|
+
try {
|
|
1158
|
+
a.apiConfigJumpGroupIndex(null, null, null, null, (data, error) => {
|
|
1159
|
+
try {
|
|
1160
|
+
if (stub) {
|
|
1161
|
+
runCommonAsserts(data, error);
|
|
1162
|
+
assert.equal('object', typeof data.response[0]);
|
|
1163
|
+
assert.equal('object', typeof data.response[1]);
|
|
1164
|
+
assert.equal('object', typeof data.response[2]);
|
|
1165
|
+
assert.equal('object', typeof data.response[3]);
|
|
1166
|
+
} else {
|
|
1167
|
+
runCommonAsserts(data, error);
|
|
1168
|
+
}
|
|
1169
|
+
saveMockData('JumpGroup', 'apiConfigJumpGroupIndex', 'default', data);
|
|
1170
|
+
done();
|
|
1171
|
+
} catch (err) {
|
|
1172
|
+
log.error(`Test Failure: ${err}`);
|
|
1173
|
+
done(err);
|
|
1174
|
+
}
|
|
1175
|
+
});
|
|
1176
|
+
} catch (error) {
|
|
1177
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1178
|
+
done(error);
|
|
1179
|
+
}
|
|
1180
|
+
}).timeout(attemptTimeout);
|
|
1181
|
+
});
|
|
1182
|
+
|
|
1183
|
+
const jumpGroupApiConfigJumpGroupUpdateBodyParam = {};
|
|
1184
|
+
describe('#apiConfigJumpGroupUpdate - errors', () => {
|
|
1185
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1186
|
+
try {
|
|
1187
|
+
a.apiConfigJumpGroupUpdate(jumpGroupId, jumpGroupApiConfigJumpGroupUpdateBodyParam, (data, error) => {
|
|
1188
|
+
try {
|
|
1189
|
+
if (stub) {
|
|
1190
|
+
const displayE = 'Error 400 received on request';
|
|
1191
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
1192
|
+
} else {
|
|
1193
|
+
runCommonAsserts(data, error);
|
|
1194
|
+
}
|
|
1195
|
+
saveMockData('JumpGroup', 'apiConfigJumpGroupUpdate', 'default', data);
|
|
1196
|
+
done();
|
|
1197
|
+
} catch (err) {
|
|
1198
|
+
log.error(`Test Failure: ${err}`);
|
|
1199
|
+
done(err);
|
|
1200
|
+
}
|
|
1201
|
+
});
|
|
1202
|
+
} catch (error) {
|
|
1203
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1204
|
+
done(error);
|
|
1205
|
+
}
|
|
1206
|
+
}).timeout(attemptTimeout);
|
|
1207
|
+
});
|
|
1208
|
+
|
|
1209
|
+
describe('#apiConfigJumpGroupShow - errors', () => {
|
|
1210
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1211
|
+
try {
|
|
1212
|
+
a.apiConfigJumpGroupShow(jumpGroupId, (data, error) => {
|
|
1213
|
+
try {
|
|
1214
|
+
if (stub) {
|
|
1215
|
+
const displayE = 'Error 400 received on request';
|
|
1216
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
1217
|
+
} else {
|
|
1218
|
+
runCommonAsserts(data, error);
|
|
1219
|
+
}
|
|
1220
|
+
saveMockData('JumpGroup', 'apiConfigJumpGroupShow', 'default', data);
|
|
1221
|
+
done();
|
|
1222
|
+
} catch (err) {
|
|
1223
|
+
log.error(`Test Failure: ${err}`);
|
|
1224
|
+
done(err);
|
|
1225
|
+
}
|
|
1226
|
+
});
|
|
1227
|
+
} catch (error) {
|
|
1228
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1229
|
+
done(error);
|
|
1230
|
+
}
|
|
1231
|
+
}).timeout(attemptTimeout);
|
|
1232
|
+
});
|
|
1233
|
+
|
|
1234
|
+
describe('#apiConfigJumpGroupUserIndex - errors', () => {
|
|
1235
|
+
it('should work if integrated or standalone with mockdata', (done) => {
|
|
1236
|
+
try {
|
|
1237
|
+
a.apiConfigJumpGroupUserIndex(jumpGroupId, null, null, (data, error) => {
|
|
1238
|
+
try {
|
|
1239
|
+
if (stub) {
|
|
1240
|
+
runCommonAsserts(data, error);
|
|
1241
|
+
assert.equal('object', typeof data.response[0]);
|
|
1242
|
+
} else {
|
|
1243
|
+
runCommonAsserts(data, error);
|
|
1244
|
+
}
|
|
1245
|
+
saveMockData('JumpGroup', 'apiConfigJumpGroupUserIndex', 'default', data);
|
|
1246
|
+
done();
|
|
1247
|
+
} catch (err) {
|
|
1248
|
+
log.error(`Test Failure: ${err}`);
|
|
1249
|
+
done(err);
|
|
1250
|
+
}
|
|
1251
|
+
});
|
|
1252
|
+
} catch (error) {
|
|
1253
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1254
|
+
done(error);
|
|
1255
|
+
}
|
|
1256
|
+
}).timeout(attemptTimeout);
|
|
1257
|
+
});
|
|
1258
|
+
|
|
1259
|
+
const jumpGroupUserId = 555;
|
|
1260
|
+
const jumpGroupApiConfigJumpGroupUserUpdateBodyParam = {};
|
|
1261
|
+
describe('#apiConfigJumpGroupUserUpdate - errors', () => {
|
|
1262
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1263
|
+
try {
|
|
1264
|
+
a.apiConfigJumpGroupUserUpdate(jumpGroupId, jumpGroupUserId, jumpGroupApiConfigJumpGroupUserUpdateBodyParam, (data, error) => {
|
|
1265
|
+
try {
|
|
1266
|
+
if (stub) {
|
|
1267
|
+
const displayE = 'Error 400 received on request';
|
|
1268
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
1269
|
+
} else {
|
|
1270
|
+
runCommonAsserts(data, error);
|
|
1271
|
+
}
|
|
1272
|
+
saveMockData('JumpGroup', 'apiConfigJumpGroupUserUpdate', 'default', data);
|
|
1273
|
+
done();
|
|
1274
|
+
} catch (err) {
|
|
1275
|
+
log.error(`Test Failure: ${err}`);
|
|
1276
|
+
done(err);
|
|
1277
|
+
}
|
|
1278
|
+
});
|
|
1279
|
+
} catch (error) {
|
|
1280
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1281
|
+
done(error);
|
|
1282
|
+
}
|
|
1283
|
+
}).timeout(attemptTimeout);
|
|
1284
|
+
});
|
|
1285
|
+
|
|
1286
|
+
describe('#apiConfigJumpGroupUserShow - errors', () => {
|
|
1287
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1288
|
+
try {
|
|
1289
|
+
a.apiConfigJumpGroupUserShow(jumpGroupId, jumpGroupUserId, (data, error) => {
|
|
1290
|
+
try {
|
|
1291
|
+
if (stub) {
|
|
1292
|
+
const displayE = 'Error 400 received on request';
|
|
1293
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
1294
|
+
} else {
|
|
1295
|
+
runCommonAsserts(data, error);
|
|
1296
|
+
}
|
|
1297
|
+
saveMockData('JumpGroup', 'apiConfigJumpGroupUserShow', 'default', data);
|
|
1298
|
+
done();
|
|
1299
|
+
} catch (err) {
|
|
1300
|
+
log.error(`Test Failure: ${err}`);
|
|
1301
|
+
done(err);
|
|
1302
|
+
}
|
|
1303
|
+
});
|
|
1304
|
+
} catch (error) {
|
|
1305
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1306
|
+
done(error);
|
|
1307
|
+
}
|
|
1308
|
+
}).timeout(attemptTimeout);
|
|
1309
|
+
});
|
|
1310
|
+
|
|
1311
|
+
const jumpointApiConfigJumpointStoreBodyParam = {
|
|
1312
|
+
name: 'string',
|
|
1313
|
+
platform: null
|
|
1314
|
+
};
|
|
1315
|
+
describe('#apiConfigJumpointStore - errors', () => {
|
|
1316
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1317
|
+
try {
|
|
1318
|
+
a.apiConfigJumpointStore(jumpointApiConfigJumpointStoreBodyParam, (data, error) => {
|
|
1319
|
+
try {
|
|
1320
|
+
if (stub) {
|
|
1321
|
+
const displayE = 'Error 400 received on request';
|
|
1322
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
1323
|
+
} else {
|
|
1324
|
+
runCommonAsserts(data, error);
|
|
1325
|
+
}
|
|
1326
|
+
saveMockData('Jumpoint', 'apiConfigJumpointStore', 'default', data);
|
|
1327
|
+
done();
|
|
1328
|
+
} catch (err) {
|
|
1329
|
+
log.error(`Test Failure: ${err}`);
|
|
1330
|
+
done(err);
|
|
1331
|
+
}
|
|
1332
|
+
});
|
|
1333
|
+
} catch (error) {
|
|
1334
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1335
|
+
done(error);
|
|
1336
|
+
}
|
|
1337
|
+
}).timeout(attemptTimeout);
|
|
1338
|
+
});
|
|
1339
|
+
|
|
1340
|
+
const jumpointId = 555;
|
|
1341
|
+
describe('#apiConfigJumpointUserStore - errors', () => {
|
|
1342
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1343
|
+
try {
|
|
1344
|
+
a.apiConfigJumpointUserStore(jumpointId, (data, error) => {
|
|
1345
|
+
try {
|
|
1346
|
+
if (stub) {
|
|
1347
|
+
const displayE = 'Error 400 received on request';
|
|
1348
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
1349
|
+
} else {
|
|
1350
|
+
runCommonAsserts(data, error);
|
|
1351
|
+
}
|
|
1352
|
+
saveMockData('Jumpoint', 'apiConfigJumpointUserStore', 'default', data);
|
|
1353
|
+
done();
|
|
1354
|
+
} catch (err) {
|
|
1355
|
+
log.error(`Test Failure: ${err}`);
|
|
1356
|
+
done(err);
|
|
1357
|
+
}
|
|
1358
|
+
});
|
|
1359
|
+
} catch (error) {
|
|
1360
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1361
|
+
done(error);
|
|
1362
|
+
}
|
|
1363
|
+
}).timeout(attemptTimeout);
|
|
1364
|
+
});
|
|
1365
|
+
|
|
1366
|
+
describe('#apiConfigJumpointIndex - errors', () => {
|
|
1367
|
+
it('should work if integrated or standalone with mockdata', (done) => {
|
|
1368
|
+
try {
|
|
1369
|
+
a.apiConfigJumpointIndex(null, null, null, null, null, null, null, (data, error) => {
|
|
1370
|
+
try {
|
|
1371
|
+
if (stub) {
|
|
1372
|
+
runCommonAsserts(data, error);
|
|
1373
|
+
assert.equal('object', typeof data.response[0]);
|
|
1374
|
+
assert.equal('object', typeof data.response[1]);
|
|
1375
|
+
assert.equal('object', typeof data.response[2]);
|
|
1376
|
+
assert.equal('object', typeof data.response[3]);
|
|
1377
|
+
} else {
|
|
1378
|
+
runCommonAsserts(data, error);
|
|
1379
|
+
}
|
|
1380
|
+
saveMockData('Jumpoint', 'apiConfigJumpointIndex', 'default', data);
|
|
1381
|
+
done();
|
|
1382
|
+
} catch (err) {
|
|
1383
|
+
log.error(`Test Failure: ${err}`);
|
|
1384
|
+
done(err);
|
|
1385
|
+
}
|
|
1386
|
+
});
|
|
1387
|
+
} catch (error) {
|
|
1388
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1389
|
+
done(error);
|
|
1390
|
+
}
|
|
1391
|
+
}).timeout(attemptTimeout);
|
|
1392
|
+
});
|
|
1393
|
+
|
|
1394
|
+
const jumpointApiConfigJumpointUpdateBodyParam = {};
|
|
1395
|
+
describe('#apiConfigJumpointUpdate - errors', () => {
|
|
1396
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1397
|
+
try {
|
|
1398
|
+
a.apiConfigJumpointUpdate(jumpointId, jumpointApiConfigJumpointUpdateBodyParam, (data, error) => {
|
|
1399
|
+
try {
|
|
1400
|
+
if (stub) {
|
|
1401
|
+
const displayE = 'Error 400 received on request';
|
|
1402
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
1403
|
+
} else {
|
|
1404
|
+
runCommonAsserts(data, error);
|
|
1405
|
+
}
|
|
1406
|
+
saveMockData('Jumpoint', 'apiConfigJumpointUpdate', 'default', data);
|
|
1407
|
+
done();
|
|
1408
|
+
} catch (err) {
|
|
1409
|
+
log.error(`Test Failure: ${err}`);
|
|
1410
|
+
done(err);
|
|
1411
|
+
}
|
|
1412
|
+
});
|
|
1413
|
+
} catch (error) {
|
|
1414
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1415
|
+
done(error);
|
|
1416
|
+
}
|
|
1417
|
+
}).timeout(attemptTimeout);
|
|
1418
|
+
});
|
|
1419
|
+
|
|
1420
|
+
describe('#apiConfigJumpointShow - errors', () => {
|
|
1421
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1422
|
+
try {
|
|
1423
|
+
a.apiConfigJumpointShow(jumpointId, (data, error) => {
|
|
1424
|
+
try {
|
|
1425
|
+
if (stub) {
|
|
1426
|
+
const displayE = 'Error 400 received on request';
|
|
1427
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
1428
|
+
} else {
|
|
1429
|
+
runCommonAsserts(data, error);
|
|
1430
|
+
}
|
|
1431
|
+
saveMockData('Jumpoint', 'apiConfigJumpointShow', 'default', data);
|
|
1432
|
+
done();
|
|
1433
|
+
} catch (err) {
|
|
1434
|
+
log.error(`Test Failure: ${err}`);
|
|
1435
|
+
done(err);
|
|
1436
|
+
}
|
|
1437
|
+
});
|
|
1438
|
+
} catch (error) {
|
|
1439
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1440
|
+
done(error);
|
|
1441
|
+
}
|
|
1442
|
+
}).timeout(attemptTimeout);
|
|
1443
|
+
});
|
|
1444
|
+
|
|
1445
|
+
describe('#apiConfigJumpointDownload - errors', () => {
|
|
1446
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1447
|
+
try {
|
|
1448
|
+
a.apiConfigJumpointDownload(jumpointId, (data, error) => {
|
|
1449
|
+
try {
|
|
1450
|
+
if (stub) {
|
|
1451
|
+
const displayE = 'Error 400 received on request';
|
|
1452
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
1453
|
+
} else {
|
|
1454
|
+
runCommonAsserts(data, error);
|
|
1455
|
+
}
|
|
1456
|
+
saveMockData('Jumpoint', 'apiConfigJumpointDownload', 'default', data);
|
|
1457
|
+
done();
|
|
1458
|
+
} catch (err) {
|
|
1459
|
+
log.error(`Test Failure: ${err}`);
|
|
1460
|
+
done(err);
|
|
1461
|
+
}
|
|
1462
|
+
});
|
|
1463
|
+
} catch (error) {
|
|
1464
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1465
|
+
done(error);
|
|
1466
|
+
}
|
|
1467
|
+
}).timeout(attemptTimeout);
|
|
1468
|
+
});
|
|
1469
|
+
|
|
1470
|
+
describe('#apiConfigJumpointNodeIndex - errors', () => {
|
|
1471
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1472
|
+
try {
|
|
1473
|
+
a.apiConfigJumpointNodeIndex(jumpointId, (data, error) => {
|
|
1474
|
+
try {
|
|
1475
|
+
if (stub) {
|
|
1476
|
+
const displayE = 'Error 400 received on request';
|
|
1477
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
1478
|
+
} else {
|
|
1479
|
+
runCommonAsserts(data, error);
|
|
1480
|
+
}
|
|
1481
|
+
saveMockData('Jumpoint', 'apiConfigJumpointNodeIndex', 'default', data);
|
|
1482
|
+
done();
|
|
1483
|
+
} catch (err) {
|
|
1484
|
+
log.error(`Test Failure: ${err}`);
|
|
1485
|
+
done(err);
|
|
1486
|
+
}
|
|
1487
|
+
});
|
|
1488
|
+
} catch (error) {
|
|
1489
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1490
|
+
done(error);
|
|
1491
|
+
}
|
|
1492
|
+
}).timeout(attemptTimeout);
|
|
1493
|
+
});
|
|
1494
|
+
|
|
1495
|
+
describe('#apiConfigJumpointUserIndex - errors', () => {
|
|
1496
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1497
|
+
try {
|
|
1498
|
+
a.apiConfigJumpointUserIndex(jumpointId, null, null, (data, error) => {
|
|
1499
|
+
try {
|
|
1500
|
+
if (stub) {
|
|
1501
|
+
const displayE = 'Error 400 received on request';
|
|
1502
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
1503
|
+
} else {
|
|
1504
|
+
runCommonAsserts(data, error);
|
|
1505
|
+
}
|
|
1506
|
+
saveMockData('Jumpoint', 'apiConfigJumpointUserIndex', 'default', data);
|
|
1507
|
+
done();
|
|
1508
|
+
} catch (err) {
|
|
1509
|
+
log.error(`Test Failure: ${err}`);
|
|
1510
|
+
done(err);
|
|
1511
|
+
}
|
|
1512
|
+
});
|
|
1513
|
+
} catch (error) {
|
|
1514
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1515
|
+
done(error);
|
|
1516
|
+
}
|
|
1517
|
+
}).timeout(attemptTimeout);
|
|
1518
|
+
});
|
|
1519
|
+
|
|
1520
|
+
const jumpointUserId = 555;
|
|
1521
|
+
describe('#apiConfigJumpointUserShow - errors', () => {
|
|
1522
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1523
|
+
try {
|
|
1524
|
+
a.apiConfigJumpointUserShow(jumpointId, jumpointUserId, (data, error) => {
|
|
1525
|
+
try {
|
|
1526
|
+
if (stub) {
|
|
1527
|
+
const displayE = 'Error 400 received on request';
|
|
1528
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
1529
|
+
} else {
|
|
1530
|
+
runCommonAsserts(data, error);
|
|
1531
|
+
}
|
|
1532
|
+
saveMockData('Jumpoint', 'apiConfigJumpointUserShow', 'default', data);
|
|
1533
|
+
done();
|
|
1534
|
+
} catch (err) {
|
|
1535
|
+
log.error(`Test Failure: ${err}`);
|
|
1536
|
+
done(err);
|
|
1537
|
+
}
|
|
1538
|
+
});
|
|
1539
|
+
} catch (error) {
|
|
1540
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1541
|
+
done(error);
|
|
1542
|
+
}
|
|
1543
|
+
}).timeout(attemptTimeout);
|
|
1544
|
+
});
|
|
1545
|
+
|
|
1546
|
+
const jumpPolicyApiConfigJumpPolicyStoreBodyParam = {};
|
|
1547
|
+
describe('#apiConfigJumpPolicyStore - errors', () => {
|
|
1548
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1549
|
+
try {
|
|
1550
|
+
a.apiConfigJumpPolicyStore(jumpPolicyApiConfigJumpPolicyStoreBodyParam, (data, error) => {
|
|
1551
|
+
try {
|
|
1552
|
+
if (stub) {
|
|
1553
|
+
const displayE = 'Error 400 received on request';
|
|
1554
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
1555
|
+
} else {
|
|
1556
|
+
runCommonAsserts(data, error);
|
|
1557
|
+
}
|
|
1558
|
+
saveMockData('JumpPolicy', 'apiConfigJumpPolicyStore', 'default', data);
|
|
1559
|
+
done();
|
|
1560
|
+
} catch (err) {
|
|
1561
|
+
log.error(`Test Failure: ${err}`);
|
|
1562
|
+
done(err);
|
|
1563
|
+
}
|
|
1564
|
+
});
|
|
1565
|
+
} catch (error) {
|
|
1566
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1567
|
+
done(error);
|
|
1568
|
+
}
|
|
1569
|
+
}).timeout(attemptTimeout);
|
|
1570
|
+
});
|
|
1571
|
+
|
|
1572
|
+
describe('#apiConfigJumpPolicyIndex - errors', () => {
|
|
1573
|
+
it('should work if integrated or standalone with mockdata', (done) => {
|
|
1574
|
+
try {
|
|
1575
|
+
a.apiConfigJumpPolicyIndex(null, null, null, (data, error) => {
|
|
1576
|
+
try {
|
|
1577
|
+
if (stub) {
|
|
1578
|
+
runCommonAsserts(data, error);
|
|
1579
|
+
assert.equal('object', typeof data.response[0]);
|
|
1580
|
+
assert.equal('object', typeof data.response[1]);
|
|
1581
|
+
assert.equal('object', typeof data.response[2]);
|
|
1582
|
+
assert.equal('object', typeof data.response[3]);
|
|
1583
|
+
} else {
|
|
1584
|
+
runCommonAsserts(data, error);
|
|
1585
|
+
}
|
|
1586
|
+
saveMockData('JumpPolicy', 'apiConfigJumpPolicyIndex', 'default', data);
|
|
1587
|
+
done();
|
|
1588
|
+
} catch (err) {
|
|
1589
|
+
log.error(`Test Failure: ${err}`);
|
|
1590
|
+
done(err);
|
|
1591
|
+
}
|
|
1592
|
+
});
|
|
1593
|
+
} catch (error) {
|
|
1594
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1595
|
+
done(error);
|
|
1596
|
+
}
|
|
1597
|
+
}).timeout(attemptTimeout);
|
|
1598
|
+
});
|
|
1599
|
+
|
|
1600
|
+
const jumpPolicyId = 555;
|
|
1601
|
+
const jumpPolicyApiConfigJumpPolicyUpdateBodyParam = {};
|
|
1602
|
+
describe('#apiConfigJumpPolicyUpdate - errors', () => {
|
|
1603
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1604
|
+
try {
|
|
1605
|
+
a.apiConfigJumpPolicyUpdate(jumpPolicyId, jumpPolicyApiConfigJumpPolicyUpdateBodyParam, (data, error) => {
|
|
1606
|
+
try {
|
|
1607
|
+
if (stub) {
|
|
1608
|
+
const displayE = 'Error 400 received on request';
|
|
1609
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
1610
|
+
} else {
|
|
1611
|
+
runCommonAsserts(data, error);
|
|
1612
|
+
}
|
|
1613
|
+
saveMockData('JumpPolicy', 'apiConfigJumpPolicyUpdate', 'default', data);
|
|
1614
|
+
done();
|
|
1615
|
+
} catch (err) {
|
|
1616
|
+
log.error(`Test Failure: ${err}`);
|
|
1617
|
+
done(err);
|
|
1618
|
+
}
|
|
1619
|
+
});
|
|
1620
|
+
} catch (error) {
|
|
1621
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1622
|
+
done(error);
|
|
1623
|
+
}
|
|
1624
|
+
}).timeout(attemptTimeout);
|
|
1625
|
+
});
|
|
1626
|
+
|
|
1627
|
+
describe('#apiConfigJumpPolicyShow - errors', () => {
|
|
1628
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1629
|
+
try {
|
|
1630
|
+
a.apiConfigJumpPolicyShow(jumpPolicyId, (data, error) => {
|
|
1631
|
+
try {
|
|
1632
|
+
if (stub) {
|
|
1633
|
+
const displayE = 'Error 400 received on request';
|
|
1634
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
1635
|
+
} else {
|
|
1636
|
+
runCommonAsserts(data, error);
|
|
1637
|
+
}
|
|
1638
|
+
saveMockData('JumpPolicy', 'apiConfigJumpPolicyShow', 'default', data);
|
|
1639
|
+
done();
|
|
1640
|
+
} catch (err) {
|
|
1641
|
+
log.error(`Test Failure: ${err}`);
|
|
1642
|
+
done(err);
|
|
1643
|
+
}
|
|
1644
|
+
});
|
|
1645
|
+
} catch (error) {
|
|
1646
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1647
|
+
done(error);
|
|
1648
|
+
}
|
|
1649
|
+
}).timeout(attemptTimeout);
|
|
1650
|
+
});
|
|
1651
|
+
|
|
1652
|
+
describe('#apiConfigJumpPolicyShowSchedule - errors', () => {
|
|
1653
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1654
|
+
try {
|
|
1655
|
+
a.apiConfigJumpPolicyShowSchedule(jumpPolicyId, (data, error) => {
|
|
1656
|
+
try {
|
|
1657
|
+
if (stub) {
|
|
1658
|
+
const displayE = 'Error 400 received on request';
|
|
1659
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
1660
|
+
} else {
|
|
1661
|
+
runCommonAsserts(data, error);
|
|
1662
|
+
}
|
|
1663
|
+
saveMockData('JumpPolicy', 'apiConfigJumpPolicyShowSchedule', 'default', data);
|
|
1664
|
+
done();
|
|
1665
|
+
} catch (err) {
|
|
1666
|
+
log.error(`Test Failure: ${err}`);
|
|
1667
|
+
done(err);
|
|
1668
|
+
}
|
|
1669
|
+
});
|
|
1670
|
+
} catch (error) {
|
|
1671
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1672
|
+
done(error);
|
|
1673
|
+
}
|
|
1674
|
+
}).timeout(attemptTimeout);
|
|
1675
|
+
});
|
|
1676
|
+
|
|
1677
|
+
const teamApiConfigTeamStoreBodyParam = {};
|
|
1678
|
+
describe('#apiConfigTeamStore - errors', () => {
|
|
1679
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1680
|
+
try {
|
|
1681
|
+
a.apiConfigTeamStore(teamApiConfigTeamStoreBodyParam, (data, error) => {
|
|
1682
|
+
try {
|
|
1683
|
+
if (stub) {
|
|
1684
|
+
const displayE = 'Error 400 received on request';
|
|
1685
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
1686
|
+
} else {
|
|
1687
|
+
runCommonAsserts(data, error);
|
|
1688
|
+
}
|
|
1689
|
+
saveMockData('Team', 'apiConfigTeamStore', 'default', data);
|
|
1690
|
+
done();
|
|
1691
|
+
} catch (err) {
|
|
1692
|
+
log.error(`Test Failure: ${err}`);
|
|
1693
|
+
done(err);
|
|
1694
|
+
}
|
|
1695
|
+
});
|
|
1696
|
+
} catch (error) {
|
|
1697
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1698
|
+
done(error);
|
|
1699
|
+
}
|
|
1700
|
+
}).timeout(attemptTimeout);
|
|
1701
|
+
});
|
|
1702
|
+
|
|
1703
|
+
const teamId = 555;
|
|
1704
|
+
const teamApiConfigTeamUserStoreBodyParam = {
|
|
1705
|
+
team_id: 3,
|
|
1706
|
+
user_id: 9
|
|
1707
|
+
};
|
|
1708
|
+
describe('#apiConfigTeamUserStore - errors', () => {
|
|
1709
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1710
|
+
try {
|
|
1711
|
+
a.apiConfigTeamUserStore(teamId, teamApiConfigTeamUserStoreBodyParam, (data, error) => {
|
|
1712
|
+
try {
|
|
1713
|
+
if (stub) {
|
|
1714
|
+
const displayE = 'Error 400 received on request';
|
|
1715
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
1716
|
+
} else {
|
|
1717
|
+
runCommonAsserts(data, error);
|
|
1718
|
+
}
|
|
1719
|
+
saveMockData('Team', 'apiConfigTeamUserStore', 'default', data);
|
|
1720
|
+
done();
|
|
1721
|
+
} catch (err) {
|
|
1722
|
+
log.error(`Test Failure: ${err}`);
|
|
1723
|
+
done(err);
|
|
1724
|
+
}
|
|
1725
|
+
});
|
|
1726
|
+
} catch (error) {
|
|
1727
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1728
|
+
done(error);
|
|
1729
|
+
}
|
|
1730
|
+
}).timeout(attemptTimeout);
|
|
1731
|
+
});
|
|
1732
|
+
|
|
1733
|
+
describe('#apiConfigTeamIndex - errors', () => {
|
|
1734
|
+
it('should work if integrated or standalone with mockdata', (done) => {
|
|
1735
|
+
try {
|
|
1736
|
+
a.apiConfigTeamIndex(null, null, null, null, (data, error) => {
|
|
1737
|
+
try {
|
|
1738
|
+
if (stub) {
|
|
1739
|
+
runCommonAsserts(data, error);
|
|
1740
|
+
assert.equal('object', typeof data.response[0]);
|
|
1741
|
+
assert.equal('object', typeof data.response[1]);
|
|
1742
|
+
} else {
|
|
1743
|
+
runCommonAsserts(data, error);
|
|
1744
|
+
}
|
|
1745
|
+
saveMockData('Team', 'apiConfigTeamIndex', 'default', data);
|
|
1746
|
+
done();
|
|
1747
|
+
} catch (err) {
|
|
1748
|
+
log.error(`Test Failure: ${err}`);
|
|
1749
|
+
done(err);
|
|
1750
|
+
}
|
|
1751
|
+
});
|
|
1752
|
+
} catch (error) {
|
|
1753
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1754
|
+
done(error);
|
|
1755
|
+
}
|
|
1756
|
+
}).timeout(attemptTimeout);
|
|
1757
|
+
});
|
|
1758
|
+
|
|
1759
|
+
const teamApiConfigTeamUpdateBodyParam = {};
|
|
1760
|
+
describe('#apiConfigTeamUpdate - errors', () => {
|
|
1761
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1762
|
+
try {
|
|
1763
|
+
a.apiConfigTeamUpdate(teamId, teamApiConfigTeamUpdateBodyParam, (data, error) => {
|
|
1764
|
+
try {
|
|
1765
|
+
if (stub) {
|
|
1766
|
+
const displayE = 'Error 400 received on request';
|
|
1767
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
1768
|
+
} else {
|
|
1769
|
+
runCommonAsserts(data, error);
|
|
1770
|
+
}
|
|
1771
|
+
saveMockData('Team', 'apiConfigTeamUpdate', 'default', data);
|
|
1772
|
+
done();
|
|
1773
|
+
} catch (err) {
|
|
1774
|
+
log.error(`Test Failure: ${err}`);
|
|
1775
|
+
done(err);
|
|
1776
|
+
}
|
|
1777
|
+
});
|
|
1778
|
+
} catch (error) {
|
|
1779
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1780
|
+
done(error);
|
|
1781
|
+
}
|
|
1782
|
+
}).timeout(attemptTimeout);
|
|
1783
|
+
});
|
|
1784
|
+
|
|
1785
|
+
describe('#apiConfigTeamShow - errors', () => {
|
|
1786
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1787
|
+
try {
|
|
1788
|
+
a.apiConfigTeamShow(teamId, (data, error) => {
|
|
1789
|
+
try {
|
|
1790
|
+
if (stub) {
|
|
1791
|
+
const displayE = 'Error 400 received on request';
|
|
1792
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
1793
|
+
} else {
|
|
1794
|
+
runCommonAsserts(data, error);
|
|
1795
|
+
}
|
|
1796
|
+
saveMockData('Team', 'apiConfigTeamShow', 'default', data);
|
|
1797
|
+
done();
|
|
1798
|
+
} catch (err) {
|
|
1799
|
+
log.error(`Test Failure: ${err}`);
|
|
1800
|
+
done(err);
|
|
1801
|
+
}
|
|
1802
|
+
});
|
|
1803
|
+
} catch (error) {
|
|
1804
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1805
|
+
done(error);
|
|
1806
|
+
}
|
|
1807
|
+
}).timeout(attemptTimeout);
|
|
1808
|
+
});
|
|
1809
|
+
|
|
1810
|
+
describe('#apiConfigTeamUserIndex - errors', () => {
|
|
1811
|
+
it('should work if integrated or standalone with mockdata', (done) => {
|
|
1812
|
+
try {
|
|
1813
|
+
a.apiConfigTeamUserIndex(teamId, null, null, (data, error) => {
|
|
1814
|
+
try {
|
|
1815
|
+
if (stub) {
|
|
1816
|
+
runCommonAsserts(data, error);
|
|
1817
|
+
assert.equal('object', typeof data.response[0]);
|
|
1818
|
+
} else {
|
|
1819
|
+
runCommonAsserts(data, error);
|
|
1820
|
+
}
|
|
1821
|
+
saveMockData('Team', 'apiConfigTeamUserIndex', 'default', data);
|
|
1822
|
+
done();
|
|
1823
|
+
} catch (err) {
|
|
1824
|
+
log.error(`Test Failure: ${err}`);
|
|
1825
|
+
done(err);
|
|
1826
|
+
}
|
|
1827
|
+
});
|
|
1828
|
+
} catch (error) {
|
|
1829
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1830
|
+
done(error);
|
|
1831
|
+
}
|
|
1832
|
+
}).timeout(attemptTimeout);
|
|
1833
|
+
});
|
|
1834
|
+
|
|
1835
|
+
const teamUserId = 555;
|
|
1836
|
+
const teamApiConfigTeamUserUpdateBodyParam = {
|
|
1837
|
+
team_id: 7,
|
|
1838
|
+
user_id: 4
|
|
1839
|
+
};
|
|
1840
|
+
describe('#apiConfigTeamUserUpdate - errors', () => {
|
|
1841
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1842
|
+
try {
|
|
1843
|
+
a.apiConfigTeamUserUpdate(teamId, teamUserId, teamApiConfigTeamUserUpdateBodyParam, (data, error) => {
|
|
1844
|
+
try {
|
|
1845
|
+
if (stub) {
|
|
1846
|
+
const displayE = 'Error 400 received on request';
|
|
1847
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
1848
|
+
} else {
|
|
1849
|
+
runCommonAsserts(data, error);
|
|
1850
|
+
}
|
|
1851
|
+
saveMockData('Team', 'apiConfigTeamUserUpdate', 'default', data);
|
|
1852
|
+
done();
|
|
1853
|
+
} catch (err) {
|
|
1854
|
+
log.error(`Test Failure: ${err}`);
|
|
1855
|
+
done(err);
|
|
1856
|
+
}
|
|
1857
|
+
});
|
|
1858
|
+
} catch (error) {
|
|
1859
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1860
|
+
done(error);
|
|
1861
|
+
}
|
|
1862
|
+
}).timeout(attemptTimeout);
|
|
1863
|
+
});
|
|
1864
|
+
|
|
1865
|
+
describe('#apiConfigTeamUserShow - errors', () => {
|
|
1866
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1867
|
+
try {
|
|
1868
|
+
a.apiConfigTeamUserShow(teamId, teamUserId, (data, error) => {
|
|
1869
|
+
try {
|
|
1870
|
+
if (stub) {
|
|
1871
|
+
const displayE = 'Error 400 received on request';
|
|
1872
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
1873
|
+
} else {
|
|
1874
|
+
runCommonAsserts(data, error);
|
|
1875
|
+
}
|
|
1876
|
+
saveMockData('Team', 'apiConfigTeamUserShow', 'default', data);
|
|
1877
|
+
done();
|
|
1878
|
+
} catch (err) {
|
|
1879
|
+
log.error(`Test Failure: ${err}`);
|
|
1880
|
+
done(err);
|
|
1881
|
+
}
|
|
1882
|
+
});
|
|
1883
|
+
} catch (error) {
|
|
1884
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1885
|
+
done(error);
|
|
1886
|
+
}
|
|
1887
|
+
}).timeout(attemptTimeout);
|
|
1888
|
+
});
|
|
1889
|
+
|
|
1890
|
+
const userApiConfigUserStoreBodyParam = {};
|
|
1891
|
+
describe('#apiConfigUserStore - errors', () => {
|
|
1892
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1893
|
+
try {
|
|
1894
|
+
a.apiConfigUserStore(userApiConfigUserStoreBodyParam, (data, error) => {
|
|
1895
|
+
try {
|
|
1896
|
+
if (stub) {
|
|
1897
|
+
const displayE = 'Error 400 received on request';
|
|
1898
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
1899
|
+
} else {
|
|
1900
|
+
runCommonAsserts(data, error);
|
|
1901
|
+
}
|
|
1902
|
+
saveMockData('User', 'apiConfigUserStore', 'default', data);
|
|
1903
|
+
done();
|
|
1904
|
+
} catch (err) {
|
|
1905
|
+
log.error(`Test Failure: ${err}`);
|
|
1906
|
+
done(err);
|
|
1907
|
+
}
|
|
1908
|
+
});
|
|
1909
|
+
} catch (error) {
|
|
1910
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1911
|
+
done(error);
|
|
1912
|
+
}
|
|
1913
|
+
}).timeout(attemptTimeout);
|
|
1914
|
+
});
|
|
1915
|
+
|
|
1916
|
+
describe('#apiConfigUserIndex - errors', () => {
|
|
1917
|
+
it('should work if integrated or standalone with mockdata', (done) => {
|
|
1918
|
+
try {
|
|
1919
|
+
a.apiConfigUserIndex(null, null, null, null, null, (data, error) => {
|
|
1920
|
+
try {
|
|
1921
|
+
if (stub) {
|
|
1922
|
+
runCommonAsserts(data, error);
|
|
1923
|
+
assert.equal('object', typeof data.response[0]);
|
|
1924
|
+
} else {
|
|
1925
|
+
runCommonAsserts(data, error);
|
|
1926
|
+
}
|
|
1927
|
+
saveMockData('User', 'apiConfigUserIndex', 'default', data);
|
|
1928
|
+
done();
|
|
1929
|
+
} catch (err) {
|
|
1930
|
+
log.error(`Test Failure: ${err}`);
|
|
1931
|
+
done(err);
|
|
1932
|
+
}
|
|
1933
|
+
});
|
|
1934
|
+
} catch (error) {
|
|
1935
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1936
|
+
done(error);
|
|
1937
|
+
}
|
|
1938
|
+
}).timeout(attemptTimeout);
|
|
1939
|
+
});
|
|
1940
|
+
|
|
1941
|
+
const userId = 555;
|
|
1942
|
+
const userApiConfigUserUpdateBodyParam = {};
|
|
1943
|
+
describe('#apiConfigUserUpdate - errors', () => {
|
|
1944
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1945
|
+
try {
|
|
1946
|
+
a.apiConfigUserUpdate(userId, userApiConfigUserUpdateBodyParam, (data, error) => {
|
|
1947
|
+
try {
|
|
1948
|
+
if (stub) {
|
|
1949
|
+
const displayE = 'Error 400 received on request';
|
|
1950
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
1951
|
+
} else {
|
|
1952
|
+
runCommonAsserts(data, error);
|
|
1953
|
+
}
|
|
1954
|
+
saveMockData('User', 'apiConfigUserUpdate', 'default', data);
|
|
1955
|
+
done();
|
|
1956
|
+
} catch (err) {
|
|
1957
|
+
log.error(`Test Failure: ${err}`);
|
|
1958
|
+
done(err);
|
|
1959
|
+
}
|
|
1960
|
+
});
|
|
1961
|
+
} catch (error) {
|
|
1962
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1963
|
+
done(error);
|
|
1964
|
+
}
|
|
1965
|
+
}).timeout(attemptTimeout);
|
|
1966
|
+
});
|
|
1967
|
+
|
|
1968
|
+
describe('#apiConfigUserShow - errors', () => {
|
|
1969
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1970
|
+
try {
|
|
1971
|
+
a.apiConfigUserShow(userId, (data, error) => {
|
|
1972
|
+
try {
|
|
1973
|
+
if (stub) {
|
|
1974
|
+
const displayE = 'Error 400 received on request';
|
|
1975
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
1976
|
+
} else {
|
|
1977
|
+
runCommonAsserts(data, error);
|
|
1978
|
+
}
|
|
1979
|
+
saveMockData('User', 'apiConfigUserShow', 'default', data);
|
|
1980
|
+
done();
|
|
1981
|
+
} catch (err) {
|
|
1982
|
+
log.error(`Test Failure: ${err}`);
|
|
1983
|
+
done(err);
|
|
1984
|
+
}
|
|
1985
|
+
});
|
|
1986
|
+
} catch (error) {
|
|
1987
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1988
|
+
done(error);
|
|
1989
|
+
}
|
|
1990
|
+
}).timeout(attemptTimeout);
|
|
1991
|
+
});
|
|
1992
|
+
|
|
1993
|
+
describe('#apiConfigSessionPolicyIndex - errors', () => {
|
|
1994
|
+
it('should work if integrated or standalone with mockdata', (done) => {
|
|
1995
|
+
try {
|
|
1996
|
+
a.apiConfigSessionPolicyIndex(null, null, (data, error) => {
|
|
1997
|
+
try {
|
|
1998
|
+
if (stub) {
|
|
1999
|
+
runCommonAsserts(data, error);
|
|
2000
|
+
assert.equal('object', typeof data.response[0]);
|
|
2001
|
+
assert.equal('object', typeof data.response[1]);
|
|
2002
|
+
assert.equal('object', typeof data.response[2]);
|
|
2003
|
+
} else {
|
|
2004
|
+
runCommonAsserts(data, error);
|
|
2005
|
+
}
|
|
2006
|
+
saveMockData('SessionPolicy', 'apiConfigSessionPolicyIndex', 'default', data);
|
|
2007
|
+
done();
|
|
2008
|
+
} catch (err) {
|
|
2009
|
+
log.error(`Test Failure: ${err}`);
|
|
2010
|
+
done(err);
|
|
2011
|
+
}
|
|
2012
|
+
});
|
|
2013
|
+
} catch (error) {
|
|
2014
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2015
|
+
done(error);
|
|
2016
|
+
}
|
|
2017
|
+
}).timeout(attemptTimeout);
|
|
2018
|
+
});
|
|
2019
|
+
|
|
2020
|
+
const groupPolicyId = 555;
|
|
2021
|
+
const groupPolicyApiConfigVaultGroupPolicyCopyBodyParam = {};
|
|
2022
|
+
describe('#apiConfigVaultGroupPolicyCopy - errors', () => {
|
|
2023
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2024
|
+
try {
|
|
2025
|
+
a.apiConfigVaultGroupPolicyCopy(groupPolicyId, groupPolicyApiConfigVaultGroupPolicyCopyBodyParam, (data, error) => {
|
|
2026
|
+
try {
|
|
2027
|
+
if (stub) {
|
|
2028
|
+
const displayE = 'Error 400 received on request';
|
|
2029
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
2030
|
+
} else {
|
|
2031
|
+
runCommonAsserts(data, error);
|
|
2032
|
+
}
|
|
2033
|
+
saveMockData('GroupPolicy', 'apiConfigVaultGroupPolicyCopy', 'default', data);
|
|
2034
|
+
done();
|
|
2035
|
+
} catch (err) {
|
|
2036
|
+
log.error(`Test Failure: ${err}`);
|
|
2037
|
+
done(err);
|
|
2038
|
+
}
|
|
2039
|
+
});
|
|
2040
|
+
} catch (error) {
|
|
2041
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2042
|
+
done(error);
|
|
2043
|
+
}
|
|
2044
|
+
}).timeout(attemptTimeout);
|
|
2045
|
+
});
|
|
2046
|
+
|
|
2047
|
+
const groupPolicyApiConfigGroupPolicyJumpGroupStoreBodyParam = {
|
|
2048
|
+
jump_group_id: 1,
|
|
2049
|
+
jump_item_role_id: 9,
|
|
2050
|
+
jump_policy_id: 10
|
|
2051
|
+
};
|
|
2052
|
+
describe('#apiConfigGroupPolicyJumpGroupStore - errors', () => {
|
|
2053
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2054
|
+
try {
|
|
2055
|
+
a.apiConfigGroupPolicyJumpGroupStore(groupPolicyId, groupPolicyApiConfigGroupPolicyJumpGroupStoreBodyParam, (data, error) => {
|
|
2056
|
+
try {
|
|
2057
|
+
if (stub) {
|
|
2058
|
+
const displayE = 'Error 400 received on request';
|
|
2059
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
2060
|
+
} else {
|
|
2061
|
+
runCommonAsserts(data, error);
|
|
2062
|
+
}
|
|
2063
|
+
saveMockData('GroupPolicy', 'apiConfigGroupPolicyJumpGroupStore', 'default', data);
|
|
2064
|
+
done();
|
|
2065
|
+
} catch (err) {
|
|
2066
|
+
log.error(`Test Failure: ${err}`);
|
|
2067
|
+
done(err);
|
|
2068
|
+
}
|
|
2069
|
+
});
|
|
2070
|
+
} catch (error) {
|
|
2071
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2072
|
+
done(error);
|
|
2073
|
+
}
|
|
2074
|
+
}).timeout(attemptTimeout);
|
|
2075
|
+
});
|
|
2076
|
+
|
|
2077
|
+
const groupPolicyApiConfigGroupPolicyJumpointsStoreBodyParam = {
|
|
2078
|
+
jumpoint_id: 5
|
|
2079
|
+
};
|
|
2080
|
+
describe('#apiConfigGroupPolicyJumpointsStore - errors', () => {
|
|
2081
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2082
|
+
try {
|
|
2083
|
+
a.apiConfigGroupPolicyJumpointsStore(groupPolicyId, groupPolicyApiConfigGroupPolicyJumpointsStoreBodyParam, (data, error) => {
|
|
2084
|
+
try {
|
|
2085
|
+
if (stub) {
|
|
2086
|
+
const displayE = 'Error 400 received on request';
|
|
2087
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
2088
|
+
} else {
|
|
2089
|
+
runCommonAsserts(data, error);
|
|
2090
|
+
}
|
|
2091
|
+
saveMockData('GroupPolicy', 'apiConfigGroupPolicyJumpointsStore', 'default', data);
|
|
2092
|
+
done();
|
|
2093
|
+
} catch (err) {
|
|
2094
|
+
log.error(`Test Failure: ${err}`);
|
|
2095
|
+
done(err);
|
|
2096
|
+
}
|
|
2097
|
+
});
|
|
2098
|
+
} catch (error) {
|
|
2099
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2100
|
+
done(error);
|
|
2101
|
+
}
|
|
2102
|
+
}).timeout(attemptTimeout);
|
|
2103
|
+
});
|
|
2104
|
+
|
|
2105
|
+
const groupPolicyApiConfigGroupPolicyMemberStoreBodyParam = {
|
|
2106
|
+
id: 4,
|
|
2107
|
+
security_provider_id: 1,
|
|
2108
|
+
distinguished_name: 'string',
|
|
2109
|
+
group_name: 'string'
|
|
2110
|
+
};
|
|
2111
|
+
describe('#apiConfigGroupPolicyMemberStore - errors', () => {
|
|
2112
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2113
|
+
try {
|
|
2114
|
+
a.apiConfigGroupPolicyMemberStore(groupPolicyId, groupPolicyApiConfigGroupPolicyMemberStoreBodyParam, (data, error) => {
|
|
2115
|
+
try {
|
|
2116
|
+
if (stub) {
|
|
2117
|
+
const displayE = 'Error 400 received on request';
|
|
2118
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
2119
|
+
} else {
|
|
2120
|
+
runCommonAsserts(data, error);
|
|
2121
|
+
}
|
|
2122
|
+
saveMockData('GroupPolicy', 'apiConfigGroupPolicyMemberStore', 'default', data);
|
|
2123
|
+
done();
|
|
2124
|
+
} catch (err) {
|
|
2125
|
+
log.error(`Test Failure: ${err}`);
|
|
2126
|
+
done(err);
|
|
2127
|
+
}
|
|
2128
|
+
});
|
|
2129
|
+
} catch (error) {
|
|
2130
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2131
|
+
done(error);
|
|
2132
|
+
}
|
|
2133
|
+
}).timeout(attemptTimeout);
|
|
2134
|
+
});
|
|
2135
|
+
|
|
2136
|
+
describe('#apiConfigGroupPolicyProvision - errors', () => {
|
|
2137
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2138
|
+
try {
|
|
2139
|
+
a.apiConfigGroupPolicyProvision(groupPolicyId, (data, error) => {
|
|
2140
|
+
try {
|
|
2141
|
+
if (stub) {
|
|
2142
|
+
const displayE = 'Error 400 received on request';
|
|
2143
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
2144
|
+
} else {
|
|
2145
|
+
runCommonAsserts(data, error);
|
|
2146
|
+
}
|
|
2147
|
+
saveMockData('GroupPolicy', 'apiConfigGroupPolicyProvision', 'default', data);
|
|
2148
|
+
done();
|
|
2149
|
+
} catch (err) {
|
|
2150
|
+
log.error(`Test Failure: ${err}`);
|
|
2151
|
+
done(err);
|
|
2152
|
+
}
|
|
2153
|
+
});
|
|
2154
|
+
} catch (error) {
|
|
2155
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2156
|
+
done(error);
|
|
2157
|
+
}
|
|
2158
|
+
}).timeout(attemptTimeout);
|
|
2159
|
+
});
|
|
2160
|
+
|
|
2161
|
+
const groupPolicyApiConfigGroupPolicyTeamStoreBodyParam = {
|
|
2162
|
+
team_id: 4
|
|
2163
|
+
};
|
|
2164
|
+
describe('#apiConfigGroupPolicyTeamStore - errors', () => {
|
|
2165
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2166
|
+
try {
|
|
2167
|
+
a.apiConfigGroupPolicyTeamStore(groupPolicyId, groupPolicyApiConfigGroupPolicyTeamStoreBodyParam, (data, error) => {
|
|
2168
|
+
try {
|
|
2169
|
+
if (stub) {
|
|
2170
|
+
const displayE = 'Error 400 received on request';
|
|
2171
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
2172
|
+
} else {
|
|
2173
|
+
runCommonAsserts(data, error);
|
|
2174
|
+
}
|
|
2175
|
+
saveMockData('GroupPolicy', 'apiConfigGroupPolicyTeamStore', 'default', data);
|
|
2176
|
+
done();
|
|
2177
|
+
} catch (err) {
|
|
2178
|
+
log.error(`Test Failure: ${err}`);
|
|
2179
|
+
done(err);
|
|
2180
|
+
}
|
|
2181
|
+
});
|
|
2182
|
+
} catch (error) {
|
|
2183
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2184
|
+
done(error);
|
|
2185
|
+
}
|
|
2186
|
+
}).timeout(attemptTimeout);
|
|
2187
|
+
});
|
|
2188
|
+
|
|
2189
|
+
const groupPolicyApiConfigGroupPolicyVaultAccountStoreBodyParam = {};
|
|
2190
|
+
describe('#apiConfigGroupPolicyVaultAccountStore - errors', () => {
|
|
2191
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2192
|
+
try {
|
|
2193
|
+
a.apiConfigGroupPolicyVaultAccountStore(groupPolicyId, groupPolicyApiConfigGroupPolicyVaultAccountStoreBodyParam, (data, error) => {
|
|
2194
|
+
try {
|
|
2195
|
+
if (stub) {
|
|
2196
|
+
const displayE = 'Error 400 received on request';
|
|
2197
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
2198
|
+
} else {
|
|
2199
|
+
runCommonAsserts(data, error);
|
|
2200
|
+
}
|
|
2201
|
+
saveMockData('GroupPolicy', 'apiConfigGroupPolicyVaultAccountStore', 'default', data);
|
|
2202
|
+
done();
|
|
2203
|
+
} catch (err) {
|
|
2204
|
+
log.error(`Test Failure: ${err}`);
|
|
2205
|
+
done(err);
|
|
2206
|
+
}
|
|
2207
|
+
});
|
|
2208
|
+
} catch (error) {
|
|
2209
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2210
|
+
done(error);
|
|
2211
|
+
}
|
|
2212
|
+
}).timeout(attemptTimeout);
|
|
2213
|
+
});
|
|
2214
|
+
|
|
2215
|
+
describe('#apiConfigGroupPolicyIndex - errors', () => {
|
|
2216
|
+
it('should work if integrated or standalone with mockdata', (done) => {
|
|
2217
|
+
try {
|
|
2218
|
+
a.apiConfigGroupPolicyIndex(null, null, null, (data, error) => {
|
|
2219
|
+
try {
|
|
2220
|
+
if (stub) {
|
|
2221
|
+
runCommonAsserts(data, error);
|
|
2222
|
+
assert.equal('object', typeof data.response[0]);
|
|
2223
|
+
assert.equal('object', typeof data.response[1]);
|
|
2224
|
+
assert.equal('object', typeof data.response[2]);
|
|
2225
|
+
assert.equal('object', typeof data.response[3]);
|
|
2226
|
+
} else {
|
|
2227
|
+
runCommonAsserts(data, error);
|
|
2228
|
+
}
|
|
2229
|
+
saveMockData('GroupPolicy', 'apiConfigGroupPolicyIndex', 'default', data);
|
|
2230
|
+
done();
|
|
2231
|
+
} catch (err) {
|
|
2232
|
+
log.error(`Test Failure: ${err}`);
|
|
2233
|
+
done(err);
|
|
2234
|
+
}
|
|
2235
|
+
});
|
|
2236
|
+
} catch (error) {
|
|
2237
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2238
|
+
done(error);
|
|
2239
|
+
}
|
|
2240
|
+
}).timeout(attemptTimeout);
|
|
2241
|
+
});
|
|
2242
|
+
|
|
2243
|
+
describe('#apiConfigGroupPolicyJumpGroupIndex - errors', () => {
|
|
2244
|
+
it('should work if integrated or standalone with mockdata', (done) => {
|
|
2245
|
+
try {
|
|
2246
|
+
a.apiConfigGroupPolicyJumpGroupIndex(groupPolicyId, (data, error) => {
|
|
2247
|
+
try {
|
|
2248
|
+
if (stub) {
|
|
2249
|
+
runCommonAsserts(data, error);
|
|
2250
|
+
assert.equal('object', typeof data.response[0]);
|
|
2251
|
+
assert.equal('object', typeof data.response[1]);
|
|
2252
|
+
} else {
|
|
2253
|
+
runCommonAsserts(data, error);
|
|
2254
|
+
}
|
|
2255
|
+
saveMockData('GroupPolicy', 'apiConfigGroupPolicyJumpGroupIndex', 'default', data);
|
|
2256
|
+
done();
|
|
2257
|
+
} catch (err) {
|
|
2258
|
+
log.error(`Test Failure: ${err}`);
|
|
2259
|
+
done(err);
|
|
2260
|
+
}
|
|
2261
|
+
});
|
|
2262
|
+
} catch (error) {
|
|
2263
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2264
|
+
done(error);
|
|
2265
|
+
}
|
|
2266
|
+
}).timeout(attemptTimeout);
|
|
2267
|
+
});
|
|
2268
|
+
|
|
2269
|
+
const groupPolicyJumpGroupId = 555;
|
|
2270
|
+
describe('#apiConfigGroupPolicyJumpGroupShow - errors', () => {
|
|
2271
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2272
|
+
try {
|
|
2273
|
+
a.apiConfigGroupPolicyJumpGroupShow(groupPolicyId, groupPolicyJumpGroupId, (data, error) => {
|
|
2274
|
+
try {
|
|
2275
|
+
if (stub) {
|
|
2276
|
+
const displayE = 'Error 400 received on request';
|
|
2277
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
2278
|
+
} else {
|
|
2279
|
+
runCommonAsserts(data, error);
|
|
2280
|
+
}
|
|
2281
|
+
saveMockData('GroupPolicy', 'apiConfigGroupPolicyJumpGroupShow', 'default', data);
|
|
2282
|
+
done();
|
|
2283
|
+
} catch (err) {
|
|
2284
|
+
log.error(`Test Failure: ${err}`);
|
|
2285
|
+
done(err);
|
|
2286
|
+
}
|
|
2287
|
+
});
|
|
2288
|
+
} catch (error) {
|
|
2289
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2290
|
+
done(error);
|
|
2291
|
+
}
|
|
2292
|
+
}).timeout(attemptTimeout);
|
|
2293
|
+
});
|
|
2294
|
+
|
|
2295
|
+
describe('#apiConfigGroupPolicyJumpointsIndex - errors', () => {
|
|
2296
|
+
it('should work if integrated or standalone with mockdata', (done) => {
|
|
2297
|
+
try {
|
|
2298
|
+
a.apiConfigGroupPolicyJumpointsIndex(groupPolicyId, null, null, (data, error) => {
|
|
2299
|
+
try {
|
|
2300
|
+
if (stub) {
|
|
2301
|
+
runCommonAsserts(data, error);
|
|
2302
|
+
assert.equal('object', typeof data.response[0]);
|
|
2303
|
+
assert.equal('object', typeof data.response[1]);
|
|
2304
|
+
} else {
|
|
2305
|
+
runCommonAsserts(data, error);
|
|
2306
|
+
}
|
|
2307
|
+
saveMockData('GroupPolicy', 'apiConfigGroupPolicyJumpointsIndex', 'default', data);
|
|
2308
|
+
done();
|
|
2309
|
+
} catch (err) {
|
|
2310
|
+
log.error(`Test Failure: ${err}`);
|
|
2311
|
+
done(err);
|
|
2312
|
+
}
|
|
2313
|
+
});
|
|
2314
|
+
} catch (error) {
|
|
2315
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2316
|
+
done(error);
|
|
2317
|
+
}
|
|
2318
|
+
}).timeout(attemptTimeout);
|
|
2319
|
+
});
|
|
2320
|
+
|
|
2321
|
+
const groupPolicyJumpointId = 555;
|
|
2322
|
+
describe('#apiConfigGroupPolicyJumpointsShow - errors', () => {
|
|
2323
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2324
|
+
try {
|
|
2325
|
+
a.apiConfigGroupPolicyJumpointsShow(groupPolicyId, groupPolicyJumpointId, (data, error) => {
|
|
2326
|
+
try {
|
|
2327
|
+
if (stub) {
|
|
2328
|
+
const displayE = 'Error 400 received on request';
|
|
2329
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
2330
|
+
} else {
|
|
2331
|
+
runCommonAsserts(data, error);
|
|
2332
|
+
}
|
|
2333
|
+
saveMockData('GroupPolicy', 'apiConfigGroupPolicyJumpointsShow', 'default', data);
|
|
2334
|
+
done();
|
|
2335
|
+
} catch (err) {
|
|
2336
|
+
log.error(`Test Failure: ${err}`);
|
|
2337
|
+
done(err);
|
|
2338
|
+
}
|
|
2339
|
+
});
|
|
2340
|
+
} catch (error) {
|
|
2341
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2342
|
+
done(error);
|
|
2343
|
+
}
|
|
2344
|
+
}).timeout(attemptTimeout);
|
|
2345
|
+
});
|
|
2346
|
+
|
|
2347
|
+
describe('#apiConfigGroupPolicyMemberIndex - errors', () => {
|
|
2348
|
+
it('should work if integrated or standalone with mockdata', (done) => {
|
|
2349
|
+
try {
|
|
2350
|
+
a.apiConfigGroupPolicyMemberIndex(groupPolicyId, null, null, (data, error) => {
|
|
2351
|
+
try {
|
|
2352
|
+
if (stub) {
|
|
2353
|
+
runCommonAsserts(data, error);
|
|
2354
|
+
assert.equal('object', typeof data.response[0]);
|
|
2355
|
+
assert.equal('object', typeof data.response[1]);
|
|
2356
|
+
assert.equal('object', typeof data.response[2]);
|
|
2357
|
+
assert.equal('object', typeof data.response[3]);
|
|
2358
|
+
} else {
|
|
2359
|
+
runCommonAsserts(data, error);
|
|
2360
|
+
}
|
|
2361
|
+
saveMockData('GroupPolicy', 'apiConfigGroupPolicyMemberIndex', 'default', data);
|
|
2362
|
+
done();
|
|
2363
|
+
} catch (err) {
|
|
2364
|
+
log.error(`Test Failure: ${err}`);
|
|
2365
|
+
done(err);
|
|
2366
|
+
}
|
|
2367
|
+
});
|
|
2368
|
+
} catch (error) {
|
|
2369
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2370
|
+
done(error);
|
|
2371
|
+
}
|
|
2372
|
+
}).timeout(attemptTimeout);
|
|
2373
|
+
});
|
|
2374
|
+
|
|
2375
|
+
const groupPolicyMemberId = 555;
|
|
2376
|
+
describe('#apiConfigGroupPolicyMemberShow - errors', () => {
|
|
2377
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2378
|
+
try {
|
|
2379
|
+
a.apiConfigGroupPolicyMemberShow(groupPolicyId, groupPolicyMemberId, (data, error) => {
|
|
2380
|
+
try {
|
|
2381
|
+
if (stub) {
|
|
2382
|
+
const displayE = 'Error 400 received on request';
|
|
2383
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
2384
|
+
} else {
|
|
2385
|
+
runCommonAsserts(data, error);
|
|
2386
|
+
}
|
|
2387
|
+
saveMockData('GroupPolicy', 'apiConfigGroupPolicyMemberShow', 'default', data);
|
|
2388
|
+
done();
|
|
2389
|
+
} catch (err) {
|
|
2390
|
+
log.error(`Test Failure: ${err}`);
|
|
2391
|
+
done(err);
|
|
2392
|
+
}
|
|
2393
|
+
});
|
|
2394
|
+
} catch (error) {
|
|
2395
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2396
|
+
done(error);
|
|
2397
|
+
}
|
|
2398
|
+
}).timeout(attemptTimeout);
|
|
2399
|
+
});
|
|
2400
|
+
|
|
2401
|
+
describe('#apiConfigGroupPolicyTeamIndex - errors', () => {
|
|
2402
|
+
it('should work if integrated or standalone with mockdata', (done) => {
|
|
2403
|
+
try {
|
|
2404
|
+
a.apiConfigGroupPolicyTeamIndex(groupPolicyId, null, null, (data, error) => {
|
|
2405
|
+
try {
|
|
2406
|
+
if (stub) {
|
|
2407
|
+
runCommonAsserts(data, error);
|
|
2408
|
+
assert.equal('object', typeof data.response[0]);
|
|
2409
|
+
assert.equal('object', typeof data.response[1]);
|
|
2410
|
+
} else {
|
|
2411
|
+
runCommonAsserts(data, error);
|
|
2412
|
+
}
|
|
2413
|
+
saveMockData('GroupPolicy', 'apiConfigGroupPolicyTeamIndex', 'default', data);
|
|
2414
|
+
done();
|
|
2415
|
+
} catch (err) {
|
|
2416
|
+
log.error(`Test Failure: ${err}`);
|
|
2417
|
+
done(err);
|
|
2418
|
+
}
|
|
2419
|
+
});
|
|
2420
|
+
} catch (error) {
|
|
2421
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2422
|
+
done(error);
|
|
2423
|
+
}
|
|
2424
|
+
}).timeout(attemptTimeout);
|
|
2425
|
+
});
|
|
2426
|
+
|
|
2427
|
+
const groupPolicyTeamId = 555;
|
|
2428
|
+
describe('#apiConfigGroupPolicyTeamShow - errors', () => {
|
|
2429
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2430
|
+
try {
|
|
2431
|
+
a.apiConfigGroupPolicyTeamShow(groupPolicyId, groupPolicyTeamId, (data, error) => {
|
|
2432
|
+
try {
|
|
2433
|
+
if (stub) {
|
|
2434
|
+
const displayE = 'Error 400 received on request';
|
|
2435
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
2436
|
+
} else {
|
|
2437
|
+
runCommonAsserts(data, error);
|
|
2438
|
+
}
|
|
2439
|
+
saveMockData('GroupPolicy', 'apiConfigGroupPolicyTeamShow', 'default', data);
|
|
2440
|
+
done();
|
|
2441
|
+
} catch (err) {
|
|
2442
|
+
log.error(`Test Failure: ${err}`);
|
|
2443
|
+
done(err);
|
|
2444
|
+
}
|
|
2445
|
+
});
|
|
2446
|
+
} catch (error) {
|
|
2447
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2448
|
+
done(error);
|
|
2449
|
+
}
|
|
2450
|
+
}).timeout(attemptTimeout);
|
|
2451
|
+
});
|
|
2452
|
+
|
|
2453
|
+
describe('#apiConfigGroupPolicyVaultAccountIndex - errors', () => {
|
|
2454
|
+
it('should work if integrated or standalone with mockdata', (done) => {
|
|
2455
|
+
try {
|
|
2456
|
+
a.apiConfigGroupPolicyVaultAccountIndex(groupPolicyId, (data, error) => {
|
|
2457
|
+
try {
|
|
2458
|
+
if (stub) {
|
|
2459
|
+
runCommonAsserts(data, error);
|
|
2460
|
+
assert.equal('object', typeof data.response[0]);
|
|
2461
|
+
} else {
|
|
2462
|
+
runCommonAsserts(data, error);
|
|
2463
|
+
}
|
|
2464
|
+
saveMockData('GroupPolicy', 'apiConfigGroupPolicyVaultAccountIndex', 'default', data);
|
|
2465
|
+
done();
|
|
2466
|
+
} catch (err) {
|
|
2467
|
+
log.error(`Test Failure: ${err}`);
|
|
2468
|
+
done(err);
|
|
2469
|
+
}
|
|
2470
|
+
});
|
|
2471
|
+
} catch (error) {
|
|
2472
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2473
|
+
done(error);
|
|
2474
|
+
}
|
|
2475
|
+
}).timeout(attemptTimeout);
|
|
2476
|
+
});
|
|
2477
|
+
|
|
2478
|
+
const groupPolicyAccountId = 555;
|
|
2479
|
+
describe('#apiConfigGroupPolicyVaultAccountShow - errors', () => {
|
|
2480
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2481
|
+
try {
|
|
2482
|
+
a.apiConfigGroupPolicyVaultAccountShow(groupPolicyId, groupPolicyAccountId, (data, error) => {
|
|
2483
|
+
try {
|
|
2484
|
+
if (stub) {
|
|
2485
|
+
const displayE = 'Error 400 received on request';
|
|
2486
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
2487
|
+
} else {
|
|
2488
|
+
runCommonAsserts(data, error);
|
|
2489
|
+
}
|
|
2490
|
+
saveMockData('GroupPolicy', 'apiConfigGroupPolicyVaultAccountShow', 'default', data);
|
|
2491
|
+
done();
|
|
2492
|
+
} catch (err) {
|
|
2493
|
+
log.error(`Test Failure: ${err}`);
|
|
2494
|
+
done(err);
|
|
2495
|
+
}
|
|
2496
|
+
});
|
|
2497
|
+
} catch (error) {
|
|
2498
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2499
|
+
done(error);
|
|
2500
|
+
}
|
|
2501
|
+
}).timeout(attemptTimeout);
|
|
2502
|
+
});
|
|
2503
|
+
|
|
2504
|
+
describe('#apiConfigSecurityProviderIndex - errors', () => {
|
|
2505
|
+
it('should work if integrated or standalone with mockdata', (done) => {
|
|
2506
|
+
try {
|
|
2507
|
+
a.apiConfigSecurityProviderIndex(null, null, (data, error) => {
|
|
2508
|
+
try {
|
|
2509
|
+
if (stub) {
|
|
2510
|
+
runCommonAsserts(data, error);
|
|
2511
|
+
assert.equal('object', typeof data.response[0]);
|
|
2512
|
+
assert.equal('object', typeof data.response[1]);
|
|
2513
|
+
assert.equal('object', typeof data.response[2]);
|
|
2514
|
+
} else {
|
|
2515
|
+
runCommonAsserts(data, error);
|
|
2516
|
+
}
|
|
2517
|
+
saveMockData('SecurityProvider', 'apiConfigSecurityProviderIndex', 'default', data);
|
|
2518
|
+
done();
|
|
2519
|
+
} catch (err) {
|
|
2520
|
+
log.error(`Test Failure: ${err}`);
|
|
2521
|
+
done(err);
|
|
2522
|
+
}
|
|
2523
|
+
});
|
|
2524
|
+
} catch (error) {
|
|
2525
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2526
|
+
done(error);
|
|
2527
|
+
}
|
|
2528
|
+
}).timeout(attemptTimeout);
|
|
2529
|
+
});
|
|
2530
|
+
|
|
2531
|
+
const vaultApiConfigVaultAccountStoreBodyParam = {};
|
|
2532
|
+
describe('#apiConfigVaultAccountStore - errors', () => {
|
|
2533
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2534
|
+
try {
|
|
2535
|
+
a.apiConfigVaultAccountStore(vaultApiConfigVaultAccountStoreBodyParam, (data, error) => {
|
|
2536
|
+
try {
|
|
2537
|
+
if (stub) {
|
|
2538
|
+
const displayE = 'Error 400 received on request';
|
|
2539
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
2540
|
+
} else {
|
|
2541
|
+
runCommonAsserts(data, error);
|
|
2542
|
+
}
|
|
2543
|
+
saveMockData('Vault', 'apiConfigVaultAccountStore', 'default', data);
|
|
2544
|
+
done();
|
|
2545
|
+
} catch (err) {
|
|
2546
|
+
log.error(`Test Failure: ${err}`);
|
|
2547
|
+
done(err);
|
|
2548
|
+
}
|
|
2549
|
+
});
|
|
2550
|
+
} catch (error) {
|
|
2551
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2552
|
+
done(error);
|
|
2553
|
+
}
|
|
2554
|
+
}).timeout(attemptTimeout);
|
|
2555
|
+
});
|
|
2556
|
+
|
|
2557
|
+
const vaultApiConfigVaultAccountGroupStoreBodyParam = {};
|
|
2558
|
+
describe('#apiConfigVaultAccountGroupStore - errors', () => {
|
|
2559
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2560
|
+
try {
|
|
2561
|
+
a.apiConfigVaultAccountGroupStore(vaultApiConfigVaultAccountGroupStoreBodyParam, (data, error) => {
|
|
2562
|
+
try {
|
|
2563
|
+
if (stub) {
|
|
2564
|
+
const displayE = 'Error 400 received on request';
|
|
2565
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
2566
|
+
} else {
|
|
2567
|
+
runCommonAsserts(data, error);
|
|
2568
|
+
}
|
|
2569
|
+
saveMockData('Vault', 'apiConfigVaultAccountGroupStore', 'default', data);
|
|
2570
|
+
done();
|
|
2571
|
+
} catch (err) {
|
|
2572
|
+
log.error(`Test Failure: ${err}`);
|
|
2573
|
+
done(err);
|
|
2574
|
+
}
|
|
2575
|
+
});
|
|
2576
|
+
} catch (error) {
|
|
2577
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2578
|
+
done(error);
|
|
2579
|
+
}
|
|
2580
|
+
}).timeout(attemptTimeout);
|
|
2581
|
+
});
|
|
2582
|
+
|
|
2583
|
+
const vaultId = 555;
|
|
2584
|
+
const vaultApiConfigVaultAccountGroupAccountStoreBodyParam = {
|
|
2585
|
+
account_id: 1
|
|
2586
|
+
};
|
|
2587
|
+
describe('#apiConfigVaultAccountGroupAccountStore - errors', () => {
|
|
2588
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2589
|
+
try {
|
|
2590
|
+
a.apiConfigVaultAccountGroupAccountStore(vaultId, vaultApiConfigVaultAccountGroupAccountStoreBodyParam, (data, error) => {
|
|
2591
|
+
try {
|
|
2592
|
+
if (stub) {
|
|
2593
|
+
const displayE = 'Error 400 received on request';
|
|
2594
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
2595
|
+
} else {
|
|
2596
|
+
runCommonAsserts(data, error);
|
|
2597
|
+
}
|
|
2598
|
+
saveMockData('Vault', 'apiConfigVaultAccountGroupAccountStore', 'default', data);
|
|
2599
|
+
done();
|
|
2600
|
+
} catch (err) {
|
|
2601
|
+
log.error(`Test Failure: ${err}`);
|
|
2602
|
+
done(err);
|
|
2603
|
+
}
|
|
2604
|
+
});
|
|
2605
|
+
} catch (error) {
|
|
2606
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2607
|
+
done(error);
|
|
2608
|
+
}
|
|
2609
|
+
}).timeout(attemptTimeout);
|
|
2610
|
+
});
|
|
2611
|
+
|
|
2612
|
+
const vaultApiConfigVaultAccountGroupUserStoreBodyParam = {
|
|
2613
|
+
account_id: 6,
|
|
2614
|
+
account_group_id: 5
|
|
2615
|
+
};
|
|
2616
|
+
describe('#apiConfigVaultAccountGroupUserStore - errors', () => {
|
|
2617
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2618
|
+
try {
|
|
2619
|
+
a.apiConfigVaultAccountGroupUserStore(vaultId, vaultApiConfigVaultAccountGroupUserStoreBodyParam, (data, error) => {
|
|
2620
|
+
try {
|
|
2621
|
+
if (stub) {
|
|
2622
|
+
const displayE = 'Error 400 received on request';
|
|
2623
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
2624
|
+
} else {
|
|
2625
|
+
runCommonAsserts(data, error);
|
|
2626
|
+
}
|
|
2627
|
+
saveMockData('Vault', 'apiConfigVaultAccountGroupUserStore', 'default', data);
|
|
2628
|
+
done();
|
|
2629
|
+
} catch (err) {
|
|
2630
|
+
log.error(`Test Failure: ${err}`);
|
|
2631
|
+
done(err);
|
|
2632
|
+
}
|
|
2633
|
+
});
|
|
2634
|
+
} catch (error) {
|
|
2635
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2636
|
+
done(error);
|
|
2637
|
+
}
|
|
2638
|
+
}).timeout(attemptTimeout);
|
|
2639
|
+
});
|
|
2640
|
+
|
|
2641
|
+
const vaultApiConfigVaultAccountPolicyStoreBodyParam = {};
|
|
2642
|
+
describe('#apiConfigVaultAccountPolicyStore - errors', () => {
|
|
2643
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2644
|
+
try {
|
|
2645
|
+
a.apiConfigVaultAccountPolicyStore(vaultApiConfigVaultAccountPolicyStoreBodyParam, (data, error) => {
|
|
2646
|
+
try {
|
|
2647
|
+
if (stub) {
|
|
2648
|
+
const displayE = 'Error 400 received on request';
|
|
2649
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
2650
|
+
} else {
|
|
2651
|
+
runCommonAsserts(data, error);
|
|
2652
|
+
}
|
|
2653
|
+
saveMockData('Vault', 'apiConfigVaultAccountPolicyStore', 'default', data);
|
|
2654
|
+
done();
|
|
2655
|
+
} catch (err) {
|
|
2656
|
+
log.error(`Test Failure: ${err}`);
|
|
2657
|
+
done(err);
|
|
2658
|
+
}
|
|
2659
|
+
});
|
|
2660
|
+
} catch (error) {
|
|
2661
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2662
|
+
done(error);
|
|
2663
|
+
}
|
|
2664
|
+
}).timeout(attemptTimeout);
|
|
2665
|
+
});
|
|
2666
|
+
|
|
2667
|
+
describe('#apiConfigVaultAccountCheckIn - errors', () => {
|
|
2668
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2669
|
+
try {
|
|
2670
|
+
a.apiConfigVaultAccountCheckIn(vaultId, (data, error) => {
|
|
2671
|
+
try {
|
|
2672
|
+
if (stub) {
|
|
2673
|
+
const displayE = 'Error 400 received on request';
|
|
2674
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
2675
|
+
} else {
|
|
2676
|
+
runCommonAsserts(data, error);
|
|
2677
|
+
}
|
|
2678
|
+
saveMockData('Vault', 'apiConfigVaultAccountCheckIn', 'default', data);
|
|
2679
|
+
done();
|
|
2680
|
+
} catch (err) {
|
|
2681
|
+
log.error(`Test Failure: ${err}`);
|
|
2682
|
+
done(err);
|
|
2683
|
+
}
|
|
2684
|
+
});
|
|
2685
|
+
} catch (error) {
|
|
2686
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2687
|
+
done(error);
|
|
2688
|
+
}
|
|
2689
|
+
}).timeout(attemptTimeout);
|
|
2690
|
+
});
|
|
2691
|
+
|
|
2692
|
+
describe('#apiConfigVaultAccountCheckOut - errors', () => {
|
|
2693
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2694
|
+
try {
|
|
2695
|
+
a.apiConfigVaultAccountCheckOut(vaultId, (data, error) => {
|
|
2696
|
+
try {
|
|
2697
|
+
if (stub) {
|
|
2698
|
+
const displayE = 'Error 400 received on request';
|
|
2699
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
2700
|
+
} else {
|
|
2701
|
+
runCommonAsserts(data, error);
|
|
2702
|
+
}
|
|
2703
|
+
saveMockData('Vault', 'apiConfigVaultAccountCheckOut', 'default', data);
|
|
2704
|
+
done();
|
|
2705
|
+
} catch (err) {
|
|
2706
|
+
log.error(`Test Failure: ${err}`);
|
|
2707
|
+
done(err);
|
|
2708
|
+
}
|
|
2709
|
+
});
|
|
2710
|
+
} catch (error) {
|
|
2711
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2712
|
+
done(error);
|
|
2713
|
+
}
|
|
2714
|
+
}).timeout(attemptTimeout);
|
|
2715
|
+
});
|
|
2716
|
+
|
|
2717
|
+
describe('#apiConfigVaultAccountForceCheckIn - errors', () => {
|
|
2718
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2719
|
+
try {
|
|
2720
|
+
a.apiConfigVaultAccountForceCheckIn(vaultId, (data, error) => {
|
|
2721
|
+
try {
|
|
2722
|
+
if (stub) {
|
|
2723
|
+
const displayE = 'Error 400 received on request';
|
|
2724
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
2725
|
+
} else {
|
|
2726
|
+
runCommonAsserts(data, error);
|
|
2727
|
+
}
|
|
2728
|
+
saveMockData('Vault', 'apiConfigVaultAccountForceCheckIn', 'default', data);
|
|
2729
|
+
done();
|
|
2730
|
+
} catch (err) {
|
|
2731
|
+
log.error(`Test Failure: ${err}`);
|
|
2732
|
+
done(err);
|
|
2733
|
+
}
|
|
2734
|
+
});
|
|
2735
|
+
} catch (error) {
|
|
2736
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2737
|
+
done(error);
|
|
2738
|
+
}
|
|
2739
|
+
}).timeout(attemptTimeout);
|
|
2740
|
+
});
|
|
2741
|
+
|
|
2742
|
+
describe('#apiConfigVaultAccountRotate - errors', () => {
|
|
2743
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2744
|
+
try {
|
|
2745
|
+
a.apiConfigVaultAccountRotate(vaultId, (data, error) => {
|
|
2746
|
+
try {
|
|
2747
|
+
if (stub) {
|
|
2748
|
+
const displayE = 'Error 400 received on request';
|
|
2749
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
2750
|
+
} else {
|
|
2751
|
+
runCommonAsserts(data, error);
|
|
2752
|
+
}
|
|
2753
|
+
saveMockData('Vault', 'apiConfigVaultAccountRotate', 'default', data);
|
|
2754
|
+
done();
|
|
2755
|
+
} catch (err) {
|
|
2756
|
+
log.error(`Test Failure: ${err}`);
|
|
2757
|
+
done(err);
|
|
2758
|
+
}
|
|
2759
|
+
});
|
|
2760
|
+
} catch (error) {
|
|
2761
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2762
|
+
done(error);
|
|
2763
|
+
}
|
|
2764
|
+
}).timeout(attemptTimeout);
|
|
2765
|
+
});
|
|
2766
|
+
|
|
2767
|
+
const vaultApiConfigVaultAccountUserStoreBodyParam = {
|
|
2768
|
+
user_id: 1,
|
|
2769
|
+
role: null
|
|
2770
|
+
};
|
|
2771
|
+
describe('#apiConfigVaultAccountUserStore - errors', () => {
|
|
2772
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2773
|
+
try {
|
|
2774
|
+
a.apiConfigVaultAccountUserStore(vaultId, vaultApiConfigVaultAccountUserStoreBodyParam, (data, error) => {
|
|
2775
|
+
try {
|
|
2776
|
+
if (stub) {
|
|
2777
|
+
const displayE = 'Error 400 received on request';
|
|
2778
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
2779
|
+
} else {
|
|
2780
|
+
runCommonAsserts(data, error);
|
|
2781
|
+
}
|
|
2782
|
+
saveMockData('Vault', 'apiConfigVaultAccountUserStore', 'default', data);
|
|
2783
|
+
done();
|
|
2784
|
+
} catch (err) {
|
|
2785
|
+
log.error(`Test Failure: ${err}`);
|
|
2786
|
+
done(err);
|
|
2787
|
+
}
|
|
2788
|
+
});
|
|
2789
|
+
} catch (error) {
|
|
2790
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2791
|
+
done(error);
|
|
2792
|
+
}
|
|
2793
|
+
}).timeout(attemptTimeout);
|
|
2794
|
+
});
|
|
2795
|
+
|
|
2796
|
+
describe('#apiConfigVaultAccountIndex - errors', () => {
|
|
2797
|
+
it('should work if integrated or standalone with mockdata', (done) => {
|
|
2798
|
+
try {
|
|
2799
|
+
a.apiConfigVaultAccountIndex(null, null, null, null, null, null, (data, error) => {
|
|
2800
|
+
try {
|
|
2801
|
+
if (stub) {
|
|
2802
|
+
runCommonAsserts(data, error);
|
|
2803
|
+
assert.equal('object', typeof data.response[0]);
|
|
2804
|
+
assert.equal('object', typeof data.response[1]);
|
|
2805
|
+
} else {
|
|
2806
|
+
runCommonAsserts(data, error);
|
|
2807
|
+
}
|
|
2808
|
+
saveMockData('Vault', 'apiConfigVaultAccountIndex', 'default', data);
|
|
2809
|
+
done();
|
|
2810
|
+
} catch (err) {
|
|
2811
|
+
log.error(`Test Failure: ${err}`);
|
|
2812
|
+
done(err);
|
|
2813
|
+
}
|
|
2814
|
+
});
|
|
2815
|
+
} catch (error) {
|
|
2816
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2817
|
+
done(error);
|
|
2818
|
+
}
|
|
2819
|
+
}).timeout(attemptTimeout);
|
|
2820
|
+
});
|
|
2821
|
+
|
|
2822
|
+
describe('#apiConfigVaultAccountGroupIndex - errors', () => {
|
|
2823
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2824
|
+
try {
|
|
2825
|
+
a.apiConfigVaultAccountGroupIndex(null, null, null, (data, error) => {
|
|
2826
|
+
try {
|
|
2827
|
+
if (stub) {
|
|
2828
|
+
const displayE = 'Error 400 received on request';
|
|
2829
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
2830
|
+
} else {
|
|
2831
|
+
runCommonAsserts(data, error);
|
|
2832
|
+
}
|
|
2833
|
+
saveMockData('Vault', 'apiConfigVaultAccountGroupIndex', 'default', data);
|
|
2834
|
+
done();
|
|
2835
|
+
} catch (err) {
|
|
2836
|
+
log.error(`Test Failure: ${err}`);
|
|
2837
|
+
done(err);
|
|
2838
|
+
}
|
|
2839
|
+
});
|
|
2840
|
+
} catch (error) {
|
|
2841
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2842
|
+
done(error);
|
|
2843
|
+
}
|
|
2844
|
+
}).timeout(attemptTimeout);
|
|
2845
|
+
});
|
|
2846
|
+
|
|
2847
|
+
const vaultApiConfigVaultAccountGroupUpdateBodyParam = {};
|
|
2848
|
+
describe('#apiConfigVaultAccountGroupUpdate - errors', () => {
|
|
2849
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2850
|
+
try {
|
|
2851
|
+
a.apiConfigVaultAccountGroupUpdate(vaultId, vaultApiConfigVaultAccountGroupUpdateBodyParam, (data, error) => {
|
|
2852
|
+
try {
|
|
2853
|
+
if (stub) {
|
|
2854
|
+
const displayE = 'Error 400 received on request';
|
|
2855
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
2856
|
+
} else {
|
|
2857
|
+
runCommonAsserts(data, error);
|
|
2858
|
+
}
|
|
2859
|
+
saveMockData('Vault', 'apiConfigVaultAccountGroupUpdate', 'default', data);
|
|
2860
|
+
done();
|
|
2861
|
+
} catch (err) {
|
|
2862
|
+
log.error(`Test Failure: ${err}`);
|
|
2863
|
+
done(err);
|
|
2864
|
+
}
|
|
2865
|
+
});
|
|
2866
|
+
} catch (error) {
|
|
2867
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2868
|
+
done(error);
|
|
2869
|
+
}
|
|
2870
|
+
}).timeout(attemptTimeout);
|
|
2871
|
+
});
|
|
2872
|
+
|
|
2873
|
+
describe('#apiConfigVaultAccountGroupShow - errors', () => {
|
|
2874
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2875
|
+
try {
|
|
2876
|
+
a.apiConfigVaultAccountGroupShow(vaultId, (data, error) => {
|
|
2877
|
+
try {
|
|
2878
|
+
if (stub) {
|
|
2879
|
+
const displayE = 'Error 400 received on request';
|
|
2880
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
2881
|
+
} else {
|
|
2882
|
+
runCommonAsserts(data, error);
|
|
2883
|
+
}
|
|
2884
|
+
saveMockData('Vault', 'apiConfigVaultAccountGroupShow', 'default', data);
|
|
2885
|
+
done();
|
|
2886
|
+
} catch (err) {
|
|
2887
|
+
log.error(`Test Failure: ${err}`);
|
|
2888
|
+
done(err);
|
|
2889
|
+
}
|
|
2890
|
+
});
|
|
2891
|
+
} catch (error) {
|
|
2892
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2893
|
+
done(error);
|
|
2894
|
+
}
|
|
2895
|
+
}).timeout(attemptTimeout);
|
|
2896
|
+
});
|
|
2897
|
+
|
|
2898
|
+
describe('#apiConfigVaultAccountGroupAccountIndex - errors', () => {
|
|
2899
|
+
it('should work if integrated or standalone with mockdata', (done) => {
|
|
2900
|
+
try {
|
|
2901
|
+
a.apiConfigVaultAccountGroupAccountIndex(vaultId, null, null, (data, error) => {
|
|
2902
|
+
try {
|
|
2903
|
+
if (stub) {
|
|
2904
|
+
runCommonAsserts(data, error);
|
|
2905
|
+
assert.equal('object', typeof data.response[0]);
|
|
2906
|
+
assert.equal('object', typeof data.response[1]);
|
|
2907
|
+
assert.equal('object', typeof data.response[2]);
|
|
2908
|
+
assert.equal('object', typeof data.response[3]);
|
|
2909
|
+
} else {
|
|
2910
|
+
runCommonAsserts(data, error);
|
|
2911
|
+
}
|
|
2912
|
+
saveMockData('Vault', 'apiConfigVaultAccountGroupAccountIndex', 'default', data);
|
|
2913
|
+
done();
|
|
2914
|
+
} catch (err) {
|
|
2915
|
+
log.error(`Test Failure: ${err}`);
|
|
2916
|
+
done(err);
|
|
2917
|
+
}
|
|
2918
|
+
});
|
|
2919
|
+
} catch (error) {
|
|
2920
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2921
|
+
done(error);
|
|
2922
|
+
}
|
|
2923
|
+
}).timeout(attemptTimeout);
|
|
2924
|
+
});
|
|
2925
|
+
|
|
2926
|
+
const vaultAccountId = 555;
|
|
2927
|
+
describe('#apiConfigVaultAccountGroupAccountShow - errors', () => {
|
|
2928
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2929
|
+
try {
|
|
2930
|
+
a.apiConfigVaultAccountGroupAccountShow(vaultId, vaultAccountId, (data, error) => {
|
|
2931
|
+
try {
|
|
2932
|
+
if (stub) {
|
|
2933
|
+
const displayE = 'Error 400 received on request';
|
|
2934
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
2935
|
+
} else {
|
|
2936
|
+
runCommonAsserts(data, error);
|
|
2937
|
+
}
|
|
2938
|
+
saveMockData('Vault', 'apiConfigVaultAccountGroupAccountShow', 'default', data);
|
|
2939
|
+
done();
|
|
2940
|
+
} catch (err) {
|
|
2941
|
+
log.error(`Test Failure: ${err}`);
|
|
2942
|
+
done(err);
|
|
2943
|
+
}
|
|
2944
|
+
});
|
|
2945
|
+
} catch (error) {
|
|
2946
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2947
|
+
done(error);
|
|
2948
|
+
}
|
|
2949
|
+
}).timeout(attemptTimeout);
|
|
2950
|
+
});
|
|
2951
|
+
|
|
2952
|
+
describe('#apiConfigVaultAccountGroupUserIndex - errors', () => {
|
|
2953
|
+
it('should work if integrated or standalone with mockdata', (done) => {
|
|
2954
|
+
try {
|
|
2955
|
+
a.apiConfigVaultAccountGroupUserIndex(vaultId, null, null, (data, error) => {
|
|
2956
|
+
try {
|
|
2957
|
+
if (stub) {
|
|
2958
|
+
runCommonAsserts(data, error);
|
|
2959
|
+
assert.equal('object', typeof data.response[0]);
|
|
2960
|
+
assert.equal('object', typeof data.response[1]);
|
|
2961
|
+
assert.equal('object', typeof data.response[2]);
|
|
2962
|
+
assert.equal('object', typeof data.response[3]);
|
|
2963
|
+
} else {
|
|
2964
|
+
runCommonAsserts(data, error);
|
|
2965
|
+
}
|
|
2966
|
+
saveMockData('Vault', 'apiConfigVaultAccountGroupUserIndex', 'default', data);
|
|
2967
|
+
done();
|
|
2968
|
+
} catch (err) {
|
|
2969
|
+
log.error(`Test Failure: ${err}`);
|
|
2970
|
+
done(err);
|
|
2971
|
+
}
|
|
2972
|
+
});
|
|
2973
|
+
} catch (error) {
|
|
2974
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2975
|
+
done(error);
|
|
2976
|
+
}
|
|
2977
|
+
}).timeout(attemptTimeout);
|
|
2978
|
+
});
|
|
2979
|
+
|
|
2980
|
+
const vaultUserId = 555;
|
|
2981
|
+
const vaultApiConfigVaultAccountGroupUserUpdateBodyParam = {
|
|
2982
|
+
user_id: 1,
|
|
2983
|
+
account_group_id: 10,
|
|
2984
|
+
role: null
|
|
2985
|
+
};
|
|
2986
|
+
describe('#apiConfigVaultAccountGroupUserUpdate - errors', () => {
|
|
2987
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2988
|
+
try {
|
|
2989
|
+
a.apiConfigVaultAccountGroupUserUpdate(vaultId, vaultUserId, vaultApiConfigVaultAccountGroupUserUpdateBodyParam, (data, error) => {
|
|
2990
|
+
try {
|
|
2991
|
+
if (stub) {
|
|
2992
|
+
const displayE = 'Error 400 received on request';
|
|
2993
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
2994
|
+
} else {
|
|
2995
|
+
runCommonAsserts(data, error);
|
|
2996
|
+
}
|
|
2997
|
+
saveMockData('Vault', 'apiConfigVaultAccountGroupUserUpdate', 'default', data);
|
|
2998
|
+
done();
|
|
2999
|
+
} catch (err) {
|
|
3000
|
+
log.error(`Test Failure: ${err}`);
|
|
3001
|
+
done(err);
|
|
3002
|
+
}
|
|
3003
|
+
});
|
|
3004
|
+
} catch (error) {
|
|
3005
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3006
|
+
done(error);
|
|
3007
|
+
}
|
|
3008
|
+
}).timeout(attemptTimeout);
|
|
3009
|
+
});
|
|
3010
|
+
|
|
3011
|
+
describe('#apiConfigVaultAccountGroupUserShow - errors', () => {
|
|
3012
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3013
|
+
try {
|
|
3014
|
+
a.apiConfigVaultAccountGroupUserShow(vaultId, vaultUserId, (data, error) => {
|
|
3015
|
+
try {
|
|
3016
|
+
if (stub) {
|
|
3017
|
+
const displayE = 'Error 400 received on request';
|
|
3018
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3019
|
+
} else {
|
|
3020
|
+
runCommonAsserts(data, error);
|
|
3021
|
+
}
|
|
3022
|
+
saveMockData('Vault', 'apiConfigVaultAccountGroupUserShow', 'default', data);
|
|
3023
|
+
done();
|
|
3024
|
+
} catch (err) {
|
|
3025
|
+
log.error(`Test Failure: ${err}`);
|
|
3026
|
+
done(err);
|
|
3027
|
+
}
|
|
3028
|
+
});
|
|
3029
|
+
} catch (error) {
|
|
3030
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3031
|
+
done(error);
|
|
3032
|
+
}
|
|
3033
|
+
}).timeout(attemptTimeout);
|
|
3034
|
+
});
|
|
3035
|
+
|
|
3036
|
+
describe('#apiConfigVaultAccountPolicyIndex - errors', () => {
|
|
3037
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3038
|
+
try {
|
|
3039
|
+
a.apiConfigVaultAccountPolicyIndex(null, null, null, null, (data, error) => {
|
|
3040
|
+
try {
|
|
3041
|
+
if (stub) {
|
|
3042
|
+
const displayE = 'Error 400 received on request';
|
|
3043
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3044
|
+
} else {
|
|
3045
|
+
runCommonAsserts(data, error);
|
|
3046
|
+
}
|
|
3047
|
+
saveMockData('Vault', 'apiConfigVaultAccountPolicyIndex', 'default', data);
|
|
3048
|
+
done();
|
|
3049
|
+
} catch (err) {
|
|
3050
|
+
log.error(`Test Failure: ${err}`);
|
|
3051
|
+
done(err);
|
|
3052
|
+
}
|
|
3053
|
+
});
|
|
3054
|
+
} catch (error) {
|
|
3055
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3056
|
+
done(error);
|
|
3057
|
+
}
|
|
3058
|
+
}).timeout(attemptTimeout);
|
|
3059
|
+
});
|
|
3060
|
+
|
|
3061
|
+
const vaultApiConfigVaultAccountPolicyUpdateBodyParam = {};
|
|
3062
|
+
describe('#apiConfigVaultAccountPolicyUpdate - errors', () => {
|
|
3063
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3064
|
+
try {
|
|
3065
|
+
a.apiConfigVaultAccountPolicyUpdate(vaultId, vaultApiConfigVaultAccountPolicyUpdateBodyParam, (data, error) => {
|
|
3066
|
+
try {
|
|
3067
|
+
if (stub) {
|
|
3068
|
+
const displayE = 'Error 400 received on request';
|
|
3069
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3070
|
+
} else {
|
|
3071
|
+
runCommonAsserts(data, error);
|
|
3072
|
+
}
|
|
3073
|
+
saveMockData('Vault', 'apiConfigVaultAccountPolicyUpdate', 'default', data);
|
|
3074
|
+
done();
|
|
3075
|
+
} catch (err) {
|
|
3076
|
+
log.error(`Test Failure: ${err}`);
|
|
3077
|
+
done(err);
|
|
3078
|
+
}
|
|
3079
|
+
});
|
|
3080
|
+
} catch (error) {
|
|
3081
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3082
|
+
done(error);
|
|
3083
|
+
}
|
|
3084
|
+
}).timeout(attemptTimeout);
|
|
3085
|
+
});
|
|
3086
|
+
|
|
3087
|
+
describe('#apiConfigVaultAccountPolicyShow - errors', () => {
|
|
3088
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3089
|
+
try {
|
|
3090
|
+
a.apiConfigVaultAccountPolicyShow(vaultId, (data, error) => {
|
|
3091
|
+
try {
|
|
3092
|
+
if (stub) {
|
|
3093
|
+
const displayE = 'Error 400 received on request';
|
|
3094
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3095
|
+
} else {
|
|
3096
|
+
runCommonAsserts(data, error);
|
|
3097
|
+
}
|
|
3098
|
+
saveMockData('Vault', 'apiConfigVaultAccountPolicyShow', 'default', data);
|
|
3099
|
+
done();
|
|
3100
|
+
} catch (err) {
|
|
3101
|
+
log.error(`Test Failure: ${err}`);
|
|
3102
|
+
done(err);
|
|
3103
|
+
}
|
|
3104
|
+
});
|
|
3105
|
+
} catch (error) {
|
|
3106
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3107
|
+
done(error);
|
|
3108
|
+
}
|
|
3109
|
+
}).timeout(attemptTimeout);
|
|
3110
|
+
});
|
|
3111
|
+
|
|
3112
|
+
const vaultApiConfigVaultAccountUpdateBodyParam = {};
|
|
3113
|
+
describe('#apiConfigVaultAccountUpdate - errors', () => {
|
|
3114
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3115
|
+
try {
|
|
3116
|
+
a.apiConfigVaultAccountUpdate(vaultId, vaultApiConfigVaultAccountUpdateBodyParam, (data, error) => {
|
|
3117
|
+
try {
|
|
3118
|
+
if (stub) {
|
|
3119
|
+
const displayE = 'Error 400 received on request';
|
|
3120
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3121
|
+
} else {
|
|
3122
|
+
runCommonAsserts(data, error);
|
|
3123
|
+
}
|
|
3124
|
+
saveMockData('Vault', 'apiConfigVaultAccountUpdate', 'default', data);
|
|
3125
|
+
done();
|
|
3126
|
+
} catch (err) {
|
|
3127
|
+
log.error(`Test Failure: ${err}`);
|
|
3128
|
+
done(err);
|
|
3129
|
+
}
|
|
3130
|
+
});
|
|
3131
|
+
} catch (error) {
|
|
3132
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3133
|
+
done(error);
|
|
3134
|
+
}
|
|
3135
|
+
}).timeout(attemptTimeout);
|
|
3136
|
+
});
|
|
3137
|
+
|
|
3138
|
+
describe('#apiConfigVaultAccountShow - errors', () => {
|
|
3139
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3140
|
+
try {
|
|
3141
|
+
a.apiConfigVaultAccountShow(vaultId, (data, error) => {
|
|
3142
|
+
try {
|
|
3143
|
+
if (stub) {
|
|
3144
|
+
const displayE = 'Error 400 received on request';
|
|
3145
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3146
|
+
} else {
|
|
3147
|
+
runCommonAsserts(data, error);
|
|
3148
|
+
}
|
|
3149
|
+
saveMockData('Vault', 'apiConfigVaultAccountShow', 'default', data);
|
|
3150
|
+
done();
|
|
3151
|
+
} catch (err) {
|
|
3152
|
+
log.error(`Test Failure: ${err}`);
|
|
3153
|
+
done(err);
|
|
3154
|
+
}
|
|
3155
|
+
});
|
|
3156
|
+
} catch (error) {
|
|
3157
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3158
|
+
done(error);
|
|
3159
|
+
}
|
|
3160
|
+
}).timeout(attemptTimeout);
|
|
3161
|
+
});
|
|
3162
|
+
|
|
3163
|
+
describe('#apiConfigVaultAccountUserIndex - errors', () => {
|
|
3164
|
+
it('should work if integrated or standalone with mockdata', (done) => {
|
|
3165
|
+
try {
|
|
3166
|
+
a.apiConfigVaultAccountUserIndex(vaultId, null, null, (data, error) => {
|
|
3167
|
+
try {
|
|
3168
|
+
if (stub) {
|
|
3169
|
+
runCommonAsserts(data, error);
|
|
3170
|
+
assert.equal('object', typeof data.response[0]);
|
|
3171
|
+
} else {
|
|
3172
|
+
runCommonAsserts(data, error);
|
|
3173
|
+
}
|
|
3174
|
+
saveMockData('Vault', 'apiConfigVaultAccountUserIndex', 'default', data);
|
|
3175
|
+
done();
|
|
3176
|
+
} catch (err) {
|
|
3177
|
+
log.error(`Test Failure: ${err}`);
|
|
3178
|
+
done(err);
|
|
3179
|
+
}
|
|
3180
|
+
});
|
|
3181
|
+
} catch (error) {
|
|
3182
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3183
|
+
done(error);
|
|
3184
|
+
}
|
|
3185
|
+
}).timeout(attemptTimeout);
|
|
3186
|
+
});
|
|
3187
|
+
|
|
3188
|
+
const vaultApiConfigVaultAccountUserUpdateBodyParam = {
|
|
3189
|
+
user_id: 6,
|
|
3190
|
+
role: null
|
|
3191
|
+
};
|
|
3192
|
+
describe('#apiConfigVaultAccountUserUpdate - errors', () => {
|
|
3193
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3194
|
+
try {
|
|
3195
|
+
a.apiConfigVaultAccountUserUpdate(vaultId, vaultUserId, vaultApiConfigVaultAccountUserUpdateBodyParam, (data, error) => {
|
|
3196
|
+
try {
|
|
3197
|
+
if (stub) {
|
|
3198
|
+
const displayE = 'Error 400 received on request';
|
|
3199
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3200
|
+
} else {
|
|
3201
|
+
runCommonAsserts(data, error);
|
|
3202
|
+
}
|
|
3203
|
+
saveMockData('Vault', 'apiConfigVaultAccountUserUpdate', 'default', data);
|
|
3204
|
+
done();
|
|
3205
|
+
} catch (err) {
|
|
3206
|
+
log.error(`Test Failure: ${err}`);
|
|
3207
|
+
done(err);
|
|
3208
|
+
}
|
|
3209
|
+
});
|
|
3210
|
+
} catch (error) {
|
|
3211
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3212
|
+
done(error);
|
|
3213
|
+
}
|
|
3214
|
+
}).timeout(attemptTimeout);
|
|
3215
|
+
});
|
|
3216
|
+
|
|
3217
|
+
describe('#apiConfigVaultAccountUserShow - errors', () => {
|
|
3218
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3219
|
+
try {
|
|
3220
|
+
a.apiConfigVaultAccountUserShow(vaultId, vaultUserId, (data, error) => {
|
|
3221
|
+
try {
|
|
3222
|
+
if (stub) {
|
|
3223
|
+
const displayE = 'Error 400 received on request';
|
|
3224
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3225
|
+
} else {
|
|
3226
|
+
runCommonAsserts(data, error);
|
|
3227
|
+
}
|
|
3228
|
+
saveMockData('Vault', 'apiConfigVaultAccountUserShow', 'default', data);
|
|
3229
|
+
done();
|
|
3230
|
+
} catch (err) {
|
|
3231
|
+
log.error(`Test Failure: ${err}`);
|
|
3232
|
+
done(err);
|
|
3233
|
+
}
|
|
3234
|
+
});
|
|
3235
|
+
} catch (error) {
|
|
3236
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3237
|
+
done(error);
|
|
3238
|
+
}
|
|
3239
|
+
}).timeout(attemptTimeout);
|
|
3240
|
+
});
|
|
3241
|
+
|
|
3242
|
+
const vendorApiConfigVendorStoreBodyParam = {
|
|
3243
|
+
id: 4,
|
|
3244
|
+
name: 'string',
|
|
3245
|
+
default_policy: 9,
|
|
3246
|
+
account_expiration: 30,
|
|
3247
|
+
user_added_notification_enabled: true,
|
|
3248
|
+
user_approval_enabled: true,
|
|
3249
|
+
administrator_id: 1,
|
|
3250
|
+
network_restrictions: []
|
|
3251
|
+
};
|
|
3252
|
+
describe('#apiConfigVendorStore - errors', () => {
|
|
3253
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3254
|
+
try {
|
|
3255
|
+
a.apiConfigVendorStore(vendorApiConfigVendorStoreBodyParam, (data, error) => {
|
|
3256
|
+
try {
|
|
3257
|
+
if (stub) {
|
|
3258
|
+
const displayE = 'Error 400 received on request';
|
|
3259
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3260
|
+
} else {
|
|
3261
|
+
runCommonAsserts(data, error);
|
|
3262
|
+
}
|
|
3263
|
+
saveMockData('Vendor', 'apiConfigVendorStore', 'default', data);
|
|
3264
|
+
done();
|
|
3265
|
+
} catch (err) {
|
|
3266
|
+
log.error(`Test Failure: ${err}`);
|
|
3267
|
+
done(err);
|
|
3268
|
+
}
|
|
3269
|
+
});
|
|
3270
|
+
} catch (error) {
|
|
3271
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3272
|
+
done(error);
|
|
3273
|
+
}
|
|
3274
|
+
}).timeout(attemptTimeout);
|
|
3275
|
+
});
|
|
3276
|
+
|
|
3277
|
+
const vendorId = 555;
|
|
3278
|
+
const vendorApiConfigVendorUserStoreBodyParam = {
|
|
3279
|
+
id: 10,
|
|
3280
|
+
username: 'string',
|
|
3281
|
+
public_display_name: 'string',
|
|
3282
|
+
password: 'string',
|
|
3283
|
+
password_expiration: 'string',
|
|
3284
|
+
password_reset_next_login: false,
|
|
3285
|
+
account_disabled: true,
|
|
3286
|
+
email_address: 'string',
|
|
3287
|
+
preferred_email_language: 'en-us',
|
|
3288
|
+
last_authenticated_date: 'string',
|
|
3289
|
+
vendor_administrator: true,
|
|
3290
|
+
is_approved: true,
|
|
3291
|
+
is_expired: true
|
|
3292
|
+
};
|
|
3293
|
+
describe('#apiConfigVendorUserStore - errors', () => {
|
|
3294
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3295
|
+
try {
|
|
3296
|
+
a.apiConfigVendorUserStore(vendorId, vendorApiConfigVendorUserStoreBodyParam, (data, error) => {
|
|
3297
|
+
try {
|
|
3298
|
+
if (stub) {
|
|
3299
|
+
const displayE = 'Error 400 received on request';
|
|
3300
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3301
|
+
} else {
|
|
3302
|
+
runCommonAsserts(data, error);
|
|
3303
|
+
}
|
|
3304
|
+
saveMockData('Vendor', 'apiConfigVendorUserStore', 'default', data);
|
|
3305
|
+
done();
|
|
3306
|
+
} catch (err) {
|
|
3307
|
+
log.error(`Test Failure: ${err}`);
|
|
3308
|
+
done(err);
|
|
3309
|
+
}
|
|
3310
|
+
});
|
|
3311
|
+
} catch (error) {
|
|
3312
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3313
|
+
done(error);
|
|
3314
|
+
}
|
|
3315
|
+
}).timeout(attemptTimeout);
|
|
3316
|
+
});
|
|
3317
|
+
|
|
3318
|
+
describe('#apiConfigVendorIndex - errors', () => {
|
|
3319
|
+
it('should work if integrated or standalone with mockdata', (done) => {
|
|
3320
|
+
try {
|
|
3321
|
+
a.apiConfigVendorIndex(null, null, null, (data, error) => {
|
|
3322
|
+
try {
|
|
3323
|
+
if (stub) {
|
|
3324
|
+
runCommonAsserts(data, error);
|
|
3325
|
+
assert.equal('object', typeof data.response[0]);
|
|
3326
|
+
assert.equal('object', typeof data.response[1]);
|
|
3327
|
+
assert.equal('object', typeof data.response[2]);
|
|
3328
|
+
} else {
|
|
3329
|
+
runCommonAsserts(data, error);
|
|
3330
|
+
}
|
|
3331
|
+
saveMockData('Vendor', 'apiConfigVendorIndex', 'default', data);
|
|
3332
|
+
done();
|
|
3333
|
+
} catch (err) {
|
|
3334
|
+
log.error(`Test Failure: ${err}`);
|
|
3335
|
+
done(err);
|
|
3336
|
+
}
|
|
3337
|
+
});
|
|
3338
|
+
} catch (error) {
|
|
3339
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3340
|
+
done(error);
|
|
3341
|
+
}
|
|
3342
|
+
}).timeout(attemptTimeout);
|
|
3343
|
+
});
|
|
3344
|
+
|
|
3345
|
+
const vendorApiConfigVendorUpdateBodyParam = {};
|
|
3346
|
+
describe('#apiConfigVendorUpdate - errors', () => {
|
|
3347
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3348
|
+
try {
|
|
3349
|
+
a.apiConfigVendorUpdate(vendorId, vendorApiConfigVendorUpdateBodyParam, (data, error) => {
|
|
3350
|
+
try {
|
|
3351
|
+
if (stub) {
|
|
3352
|
+
const displayE = 'Error 400 received on request';
|
|
3353
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3354
|
+
} else {
|
|
3355
|
+
runCommonAsserts(data, error);
|
|
3356
|
+
}
|
|
3357
|
+
saveMockData('Vendor', 'apiConfigVendorUpdate', 'default', data);
|
|
3358
|
+
done();
|
|
3359
|
+
} catch (err) {
|
|
3360
|
+
log.error(`Test Failure: ${err}`);
|
|
3361
|
+
done(err);
|
|
3362
|
+
}
|
|
3363
|
+
});
|
|
3364
|
+
} catch (error) {
|
|
3365
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3366
|
+
done(error);
|
|
3367
|
+
}
|
|
3368
|
+
}).timeout(attemptTimeout);
|
|
3369
|
+
});
|
|
3370
|
+
|
|
3371
|
+
describe('#apiConfigVendorShow - errors', () => {
|
|
3372
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3373
|
+
try {
|
|
3374
|
+
a.apiConfigVendorShow(vendorId, (data, error) => {
|
|
3375
|
+
try {
|
|
3376
|
+
if (stub) {
|
|
3377
|
+
const displayE = 'Error 400 received on request';
|
|
3378
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3379
|
+
} else {
|
|
3380
|
+
runCommonAsserts(data, error);
|
|
3381
|
+
}
|
|
3382
|
+
saveMockData('Vendor', 'apiConfigVendorShow', 'default', data);
|
|
3383
|
+
done();
|
|
3384
|
+
} catch (err) {
|
|
3385
|
+
log.error(`Test Failure: ${err}`);
|
|
3386
|
+
done(err);
|
|
3387
|
+
}
|
|
3388
|
+
});
|
|
3389
|
+
} catch (error) {
|
|
3390
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3391
|
+
done(error);
|
|
3392
|
+
}
|
|
3393
|
+
}).timeout(attemptTimeout);
|
|
3394
|
+
});
|
|
3395
|
+
|
|
3396
|
+
describe('#apiConfigVendorUserIndex - errors', () => {
|
|
3397
|
+
it('should work if integrated or standalone with mockdata', (done) => {
|
|
3398
|
+
try {
|
|
3399
|
+
a.apiConfigVendorUserIndex(vendorId, null, null, (data, error) => {
|
|
3400
|
+
try {
|
|
3401
|
+
if (stub) {
|
|
3402
|
+
runCommonAsserts(data, error);
|
|
3403
|
+
assert.equal('object', typeof data.response[0]);
|
|
3404
|
+
} else {
|
|
3405
|
+
runCommonAsserts(data, error);
|
|
3406
|
+
}
|
|
3407
|
+
saveMockData('Vendor', 'apiConfigVendorUserIndex', 'default', data);
|
|
3408
|
+
done();
|
|
3409
|
+
} catch (err) {
|
|
3410
|
+
log.error(`Test Failure: ${err}`);
|
|
3411
|
+
done(err);
|
|
3412
|
+
}
|
|
3413
|
+
});
|
|
3414
|
+
} catch (error) {
|
|
3415
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3416
|
+
done(error);
|
|
3417
|
+
}
|
|
3418
|
+
}).timeout(attemptTimeout);
|
|
3419
|
+
});
|
|
3420
|
+
|
|
3421
|
+
const vendorUserId = 555;
|
|
3422
|
+
const vendorApiConfigVendorUserUpdateBodyParam = {
|
|
3423
|
+
id: 9,
|
|
3424
|
+
username: 'string',
|
|
3425
|
+
public_display_name: 'string',
|
|
3426
|
+
password: 'string',
|
|
3427
|
+
password_expiration: 'string',
|
|
3428
|
+
password_reset_next_login: false,
|
|
3429
|
+
account_disabled: true,
|
|
3430
|
+
email_address: 'string',
|
|
3431
|
+
preferred_email_language: 'en-us',
|
|
3432
|
+
last_authenticated_date: 'string',
|
|
3433
|
+
vendor_administrator: true,
|
|
3434
|
+
is_approved: true,
|
|
3435
|
+
is_expired: true
|
|
3436
|
+
};
|
|
3437
|
+
describe('#apiConfigVendorUserUpdate - errors', () => {
|
|
3438
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3439
|
+
try {
|
|
3440
|
+
a.apiConfigVendorUserUpdate(vendorId, vendorUserId, vendorApiConfigVendorUserUpdateBodyParam, (data, error) => {
|
|
3441
|
+
try {
|
|
3442
|
+
if (stub) {
|
|
3443
|
+
const displayE = 'Error 400 received on request';
|
|
3444
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3445
|
+
} else {
|
|
3446
|
+
runCommonAsserts(data, error);
|
|
3447
|
+
}
|
|
3448
|
+
saveMockData('Vendor', 'apiConfigVendorUserUpdate', 'default', data);
|
|
3449
|
+
done();
|
|
3450
|
+
} catch (err) {
|
|
3451
|
+
log.error(`Test Failure: ${err}`);
|
|
3452
|
+
done(err);
|
|
3453
|
+
}
|
|
3454
|
+
});
|
|
3455
|
+
} catch (error) {
|
|
3456
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3457
|
+
done(error);
|
|
3458
|
+
}
|
|
3459
|
+
}).timeout(attemptTimeout);
|
|
3460
|
+
});
|
|
3461
|
+
|
|
3462
|
+
describe('#apiConfigVendorUserShow - errors', () => {
|
|
3463
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3464
|
+
try {
|
|
3465
|
+
a.apiConfigVendorUserShow(vendorId, vendorUserId, (data, error) => {
|
|
3466
|
+
try {
|
|
3467
|
+
if (stub) {
|
|
3468
|
+
const displayE = 'Error 400 received on request';
|
|
3469
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3470
|
+
} else {
|
|
3471
|
+
runCommonAsserts(data, error);
|
|
3472
|
+
}
|
|
3473
|
+
saveMockData('Vendor', 'apiConfigVendorUserShow', 'default', data);
|
|
3474
|
+
done();
|
|
3475
|
+
} catch (err) {
|
|
3476
|
+
log.error(`Test Failure: ${err}`);
|
|
3477
|
+
done(err);
|
|
3478
|
+
}
|
|
3479
|
+
});
|
|
3480
|
+
} catch (error) {
|
|
3481
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3482
|
+
done(error);
|
|
3483
|
+
}
|
|
3484
|
+
}).timeout(attemptTimeout);
|
|
3485
|
+
});
|
|
3486
|
+
|
|
3487
|
+
describe('#apiConfigSpec - errors', () => {
|
|
3488
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3489
|
+
try {
|
|
3490
|
+
a.apiConfigSpec((data, error) => {
|
|
3491
|
+
try {
|
|
3492
|
+
if (stub) {
|
|
3493
|
+
const displayE = 'Error 400 received on request';
|
|
3494
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3495
|
+
} else {
|
|
3496
|
+
runCommonAsserts(data, error);
|
|
3497
|
+
}
|
|
3498
|
+
saveMockData('OpenapiYaml', 'apiConfigSpec', 'default', data);
|
|
3499
|
+
done();
|
|
3500
|
+
} catch (err) {
|
|
3501
|
+
log.error(`Test Failure: ${err}`);
|
|
3502
|
+
done(err);
|
|
3503
|
+
}
|
|
3504
|
+
});
|
|
3505
|
+
} catch (error) {
|
|
3506
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3507
|
+
done(error);
|
|
3508
|
+
}
|
|
3509
|
+
}).timeout(attemptTimeout);
|
|
3510
|
+
});
|
|
3511
|
+
|
|
3512
|
+
describe('#apiConfigJumpClientDestroy - errors', () => {
|
|
3513
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3514
|
+
try {
|
|
3515
|
+
a.apiConfigJumpClientDestroy(jumpClientId, (data, error) => {
|
|
3516
|
+
try {
|
|
3517
|
+
if (stub) {
|
|
3518
|
+
const displayE = 'Error 400 received on request';
|
|
3519
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3520
|
+
} else {
|
|
3521
|
+
runCommonAsserts(data, error);
|
|
3522
|
+
}
|
|
3523
|
+
saveMockData('JumpClient', 'apiConfigJumpClientDestroy', 'default', data);
|
|
3524
|
+
done();
|
|
3525
|
+
} catch (err) {
|
|
3526
|
+
log.error(`Test Failure: ${err}`);
|
|
3527
|
+
done(err);
|
|
3528
|
+
}
|
|
3529
|
+
});
|
|
3530
|
+
} catch (error) {
|
|
3531
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3532
|
+
done(error);
|
|
3533
|
+
}
|
|
3534
|
+
}).timeout(attemptTimeout);
|
|
3535
|
+
});
|
|
3536
|
+
|
|
3537
|
+
describe('#apiConfigJumpItemRemoteRdpDestroy - errors', () => {
|
|
3538
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3539
|
+
try {
|
|
3540
|
+
a.apiConfigJumpItemRemoteRdpDestroy(jumpItemId, (data, error) => {
|
|
3541
|
+
try {
|
|
3542
|
+
if (stub) {
|
|
3543
|
+
const displayE = 'Error 400 received on request';
|
|
3544
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3545
|
+
} else {
|
|
3546
|
+
runCommonAsserts(data, error);
|
|
3547
|
+
}
|
|
3548
|
+
saveMockData('JumpItem', 'apiConfigJumpItemRemoteRdpDestroy', 'default', data);
|
|
3549
|
+
done();
|
|
3550
|
+
} catch (err) {
|
|
3551
|
+
log.error(`Test Failure: ${err}`);
|
|
3552
|
+
done(err);
|
|
3553
|
+
}
|
|
3554
|
+
});
|
|
3555
|
+
} catch (error) {
|
|
3556
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3557
|
+
done(error);
|
|
3558
|
+
}
|
|
3559
|
+
}).timeout(attemptTimeout);
|
|
3560
|
+
});
|
|
3561
|
+
|
|
3562
|
+
describe('#apiConfigJumpItemShellJumpDestroy - errors', () => {
|
|
3563
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3564
|
+
try {
|
|
3565
|
+
a.apiConfigJumpItemShellJumpDestroy(jumpItemId, (data, error) => {
|
|
3566
|
+
try {
|
|
3567
|
+
if (stub) {
|
|
3568
|
+
const displayE = 'Error 400 received on request';
|
|
3569
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3570
|
+
} else {
|
|
3571
|
+
runCommonAsserts(data, error);
|
|
3572
|
+
}
|
|
3573
|
+
saveMockData('JumpItem', 'apiConfigJumpItemShellJumpDestroy', 'default', data);
|
|
3574
|
+
done();
|
|
3575
|
+
} catch (err) {
|
|
3576
|
+
log.error(`Test Failure: ${err}`);
|
|
3577
|
+
done(err);
|
|
3578
|
+
}
|
|
3579
|
+
});
|
|
3580
|
+
} catch (error) {
|
|
3581
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3582
|
+
done(error);
|
|
3583
|
+
}
|
|
3584
|
+
}).timeout(attemptTimeout);
|
|
3585
|
+
});
|
|
3586
|
+
|
|
3587
|
+
describe('#apiConfigJumpItemWebJumpDestroy - errors', () => {
|
|
3588
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3589
|
+
try {
|
|
3590
|
+
a.apiConfigJumpItemWebJumpDestroy(jumpItemId, (data, error) => {
|
|
3591
|
+
try {
|
|
3592
|
+
if (stub) {
|
|
3593
|
+
const displayE = 'Error 400 received on request';
|
|
3594
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3595
|
+
} else {
|
|
3596
|
+
runCommonAsserts(data, error);
|
|
3597
|
+
}
|
|
3598
|
+
saveMockData('JumpItem', 'apiConfigJumpItemWebJumpDestroy', 'default', data);
|
|
3599
|
+
done();
|
|
3600
|
+
} catch (err) {
|
|
3601
|
+
log.error(`Test Failure: ${err}`);
|
|
3602
|
+
done(err);
|
|
3603
|
+
}
|
|
3604
|
+
});
|
|
3605
|
+
} catch (error) {
|
|
3606
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3607
|
+
done(error);
|
|
3608
|
+
}
|
|
3609
|
+
}).timeout(attemptTimeout);
|
|
3610
|
+
});
|
|
3611
|
+
|
|
3612
|
+
describe('#apiConfigJumpGroupDestroy - errors', () => {
|
|
3613
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3614
|
+
try {
|
|
3615
|
+
a.apiConfigJumpGroupDestroy(jumpGroupId, (data, error) => {
|
|
3616
|
+
try {
|
|
3617
|
+
if (stub) {
|
|
3618
|
+
const displayE = 'Error 400 received on request';
|
|
3619
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3620
|
+
} else {
|
|
3621
|
+
runCommonAsserts(data, error);
|
|
3622
|
+
}
|
|
3623
|
+
saveMockData('JumpGroup', 'apiConfigJumpGroupDestroy', 'default', data);
|
|
3624
|
+
done();
|
|
3625
|
+
} catch (err) {
|
|
3626
|
+
log.error(`Test Failure: ${err}`);
|
|
3627
|
+
done(err);
|
|
3628
|
+
}
|
|
3629
|
+
});
|
|
3630
|
+
} catch (error) {
|
|
3631
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3632
|
+
done(error);
|
|
3633
|
+
}
|
|
3634
|
+
}).timeout(attemptTimeout);
|
|
3635
|
+
});
|
|
3636
|
+
|
|
3637
|
+
describe('#apiConfigJumpGroupUserDestroy - errors', () => {
|
|
3638
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3639
|
+
try {
|
|
3640
|
+
a.apiConfigJumpGroupUserDestroy(jumpGroupId, jumpGroupUserId, (data, error) => {
|
|
3641
|
+
try {
|
|
3642
|
+
if (stub) {
|
|
3643
|
+
const displayE = 'Error 400 received on request';
|
|
3644
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3645
|
+
} else {
|
|
3646
|
+
runCommonAsserts(data, error);
|
|
3647
|
+
}
|
|
3648
|
+
saveMockData('JumpGroup', 'apiConfigJumpGroupUserDestroy', 'default', data);
|
|
3649
|
+
done();
|
|
3650
|
+
} catch (err) {
|
|
3651
|
+
log.error(`Test Failure: ${err}`);
|
|
3652
|
+
done(err);
|
|
3653
|
+
}
|
|
3654
|
+
});
|
|
3655
|
+
} catch (error) {
|
|
3656
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3657
|
+
done(error);
|
|
3658
|
+
}
|
|
3659
|
+
}).timeout(attemptTimeout);
|
|
3660
|
+
});
|
|
3661
|
+
|
|
3662
|
+
describe('#apiConfigJumpointDestroy - errors', () => {
|
|
3663
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3664
|
+
try {
|
|
3665
|
+
a.apiConfigJumpointDestroy(jumpointId, (data, error) => {
|
|
3666
|
+
try {
|
|
3667
|
+
if (stub) {
|
|
3668
|
+
const displayE = 'Error 400 received on request';
|
|
3669
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3670
|
+
} else {
|
|
3671
|
+
runCommonAsserts(data, error);
|
|
3672
|
+
}
|
|
3673
|
+
saveMockData('Jumpoint', 'apiConfigJumpointDestroy', 'default', data);
|
|
3674
|
+
done();
|
|
3675
|
+
} catch (err) {
|
|
3676
|
+
log.error(`Test Failure: ${err}`);
|
|
3677
|
+
done(err);
|
|
3678
|
+
}
|
|
3679
|
+
});
|
|
3680
|
+
} catch (error) {
|
|
3681
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3682
|
+
done(error);
|
|
3683
|
+
}
|
|
3684
|
+
}).timeout(attemptTimeout);
|
|
3685
|
+
});
|
|
3686
|
+
|
|
3687
|
+
describe('#apiConfigJumpointUserDestroy - errors', () => {
|
|
3688
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3689
|
+
try {
|
|
3690
|
+
a.apiConfigJumpointUserDestroy(jumpointId, jumpointUserId, (data, error) => {
|
|
3691
|
+
try {
|
|
3692
|
+
if (stub) {
|
|
3693
|
+
const displayE = 'Error 400 received on request';
|
|
3694
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3695
|
+
} else {
|
|
3696
|
+
runCommonAsserts(data, error);
|
|
3697
|
+
}
|
|
3698
|
+
saveMockData('Jumpoint', 'apiConfigJumpointUserDestroy', 'default', data);
|
|
3699
|
+
done();
|
|
3700
|
+
} catch (err) {
|
|
3701
|
+
log.error(`Test Failure: ${err}`);
|
|
3702
|
+
done(err);
|
|
3703
|
+
}
|
|
3704
|
+
});
|
|
3705
|
+
} catch (error) {
|
|
3706
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3707
|
+
done(error);
|
|
3708
|
+
}
|
|
3709
|
+
}).timeout(attemptTimeout);
|
|
3710
|
+
});
|
|
3711
|
+
|
|
3712
|
+
describe('#apiConfigJumpPolicyDestroy - errors', () => {
|
|
3713
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3714
|
+
try {
|
|
3715
|
+
a.apiConfigJumpPolicyDestroy(jumpPolicyId, (data, error) => {
|
|
3716
|
+
try {
|
|
3717
|
+
if (stub) {
|
|
3718
|
+
const displayE = 'Error 400 received on request';
|
|
3719
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3720
|
+
} else {
|
|
3721
|
+
runCommonAsserts(data, error);
|
|
3722
|
+
}
|
|
3723
|
+
saveMockData('JumpPolicy', 'apiConfigJumpPolicyDestroy', 'default', data);
|
|
3724
|
+
done();
|
|
3725
|
+
} catch (err) {
|
|
3726
|
+
log.error(`Test Failure: ${err}`);
|
|
3727
|
+
done(err);
|
|
3728
|
+
}
|
|
3729
|
+
});
|
|
3730
|
+
} catch (error) {
|
|
3731
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3732
|
+
done(error);
|
|
3733
|
+
}
|
|
3734
|
+
}).timeout(attemptTimeout);
|
|
3735
|
+
});
|
|
3736
|
+
|
|
3737
|
+
describe('#apiConfigTeamDestroy - errors', () => {
|
|
3738
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3739
|
+
try {
|
|
3740
|
+
a.apiConfigTeamDestroy(teamId, (data, error) => {
|
|
3741
|
+
try {
|
|
3742
|
+
if (stub) {
|
|
3743
|
+
const displayE = 'Error 400 received on request';
|
|
3744
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3745
|
+
} else {
|
|
3746
|
+
runCommonAsserts(data, error);
|
|
3747
|
+
}
|
|
3748
|
+
saveMockData('Team', 'apiConfigTeamDestroy', 'default', data);
|
|
3749
|
+
done();
|
|
3750
|
+
} catch (err) {
|
|
3751
|
+
log.error(`Test Failure: ${err}`);
|
|
3752
|
+
done(err);
|
|
3753
|
+
}
|
|
3754
|
+
});
|
|
3755
|
+
} catch (error) {
|
|
3756
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3757
|
+
done(error);
|
|
3758
|
+
}
|
|
3759
|
+
}).timeout(attemptTimeout);
|
|
3760
|
+
});
|
|
3761
|
+
|
|
3762
|
+
describe('#apiConfigTeamUserDestroy - errors', () => {
|
|
3763
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3764
|
+
try {
|
|
3765
|
+
a.apiConfigTeamUserDestroy(teamId, teamUserId, (data, error) => {
|
|
3766
|
+
try {
|
|
3767
|
+
if (stub) {
|
|
3768
|
+
const displayE = 'Error 400 received on request';
|
|
3769
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3770
|
+
} else {
|
|
3771
|
+
runCommonAsserts(data, error);
|
|
3772
|
+
}
|
|
3773
|
+
saveMockData('Team', 'apiConfigTeamUserDestroy', 'default', data);
|
|
3774
|
+
done();
|
|
3775
|
+
} catch (err) {
|
|
3776
|
+
log.error(`Test Failure: ${err}`);
|
|
3777
|
+
done(err);
|
|
3778
|
+
}
|
|
3779
|
+
});
|
|
3780
|
+
} catch (error) {
|
|
3781
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3782
|
+
done(error);
|
|
3783
|
+
}
|
|
3784
|
+
}).timeout(attemptTimeout);
|
|
3785
|
+
});
|
|
3786
|
+
|
|
3787
|
+
describe('#apiConfigUserDestroy - errors', () => {
|
|
3788
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3789
|
+
try {
|
|
3790
|
+
a.apiConfigUserDestroy(userId, (data, error) => {
|
|
3791
|
+
try {
|
|
3792
|
+
if (stub) {
|
|
3793
|
+
const displayE = 'Error 400 received on request';
|
|
3794
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3795
|
+
} else {
|
|
3796
|
+
runCommonAsserts(data, error);
|
|
3797
|
+
}
|
|
3798
|
+
saveMockData('User', 'apiConfigUserDestroy', 'default', data);
|
|
3799
|
+
done();
|
|
3800
|
+
} catch (err) {
|
|
3801
|
+
log.error(`Test Failure: ${err}`);
|
|
3802
|
+
done(err);
|
|
3803
|
+
}
|
|
3804
|
+
});
|
|
3805
|
+
} catch (error) {
|
|
3806
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3807
|
+
done(error);
|
|
3808
|
+
}
|
|
3809
|
+
}).timeout(attemptTimeout);
|
|
3810
|
+
});
|
|
3811
|
+
|
|
3812
|
+
describe('#apiConfigGroupPolicyDestroy - errors', () => {
|
|
3813
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3814
|
+
try {
|
|
3815
|
+
a.apiConfigGroupPolicyDestroy(groupPolicyId, (data, error) => {
|
|
3816
|
+
try {
|
|
3817
|
+
if (stub) {
|
|
3818
|
+
const displayE = 'Error 400 received on request';
|
|
3819
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3820
|
+
} else {
|
|
3821
|
+
runCommonAsserts(data, error);
|
|
3822
|
+
}
|
|
3823
|
+
saveMockData('GroupPolicy', 'apiConfigGroupPolicyDestroy', 'default', data);
|
|
3824
|
+
done();
|
|
3825
|
+
} catch (err) {
|
|
3826
|
+
log.error(`Test Failure: ${err}`);
|
|
3827
|
+
done(err);
|
|
3828
|
+
}
|
|
3829
|
+
});
|
|
3830
|
+
} catch (error) {
|
|
3831
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3832
|
+
done(error);
|
|
3833
|
+
}
|
|
3834
|
+
}).timeout(attemptTimeout);
|
|
3835
|
+
});
|
|
3836
|
+
|
|
3837
|
+
describe('#apiConfigGroupPolicyJumpGroupDestroy - errors', () => {
|
|
3838
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3839
|
+
try {
|
|
3840
|
+
a.apiConfigGroupPolicyJumpGroupDestroy(groupPolicyId, groupPolicyJumpGroupId, (data, error) => {
|
|
3841
|
+
try {
|
|
3842
|
+
if (stub) {
|
|
3843
|
+
const displayE = 'Error 400 received on request';
|
|
3844
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3845
|
+
} else {
|
|
3846
|
+
runCommonAsserts(data, error);
|
|
3847
|
+
}
|
|
3848
|
+
saveMockData('GroupPolicy', 'apiConfigGroupPolicyJumpGroupDestroy', 'default', data);
|
|
3849
|
+
done();
|
|
3850
|
+
} catch (err) {
|
|
3851
|
+
log.error(`Test Failure: ${err}`);
|
|
3852
|
+
done(err);
|
|
3853
|
+
}
|
|
3854
|
+
});
|
|
3855
|
+
} catch (error) {
|
|
3856
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3857
|
+
done(error);
|
|
3858
|
+
}
|
|
3859
|
+
}).timeout(attemptTimeout);
|
|
3860
|
+
});
|
|
3861
|
+
|
|
3862
|
+
describe('#apiConfigGroupPolicyJumpointsDestroy - errors', () => {
|
|
3863
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3864
|
+
try {
|
|
3865
|
+
a.apiConfigGroupPolicyJumpointsDestroy(groupPolicyId, groupPolicyJumpointId, (data, error) => {
|
|
3866
|
+
try {
|
|
3867
|
+
if (stub) {
|
|
3868
|
+
const displayE = 'Error 400 received on request';
|
|
3869
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3870
|
+
} else {
|
|
3871
|
+
runCommonAsserts(data, error);
|
|
3872
|
+
}
|
|
3873
|
+
saveMockData('GroupPolicy', 'apiConfigGroupPolicyJumpointsDestroy', 'default', data);
|
|
3874
|
+
done();
|
|
3875
|
+
} catch (err) {
|
|
3876
|
+
log.error(`Test Failure: ${err}`);
|
|
3877
|
+
done(err);
|
|
3878
|
+
}
|
|
3879
|
+
});
|
|
3880
|
+
} catch (error) {
|
|
3881
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3882
|
+
done(error);
|
|
3883
|
+
}
|
|
3884
|
+
}).timeout(attemptTimeout);
|
|
3885
|
+
});
|
|
3886
|
+
|
|
3887
|
+
describe('#apiConfigGroupPolicyMemberDestroy - errors', () => {
|
|
3888
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3889
|
+
try {
|
|
3890
|
+
a.apiConfigGroupPolicyMemberDestroy(groupPolicyId, groupPolicyMemberId, (data, error) => {
|
|
3891
|
+
try {
|
|
3892
|
+
if (stub) {
|
|
3893
|
+
const displayE = 'Error 400 received on request';
|
|
3894
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3895
|
+
} else {
|
|
3896
|
+
runCommonAsserts(data, error);
|
|
3897
|
+
}
|
|
3898
|
+
saveMockData('GroupPolicy', 'apiConfigGroupPolicyMemberDestroy', 'default', data);
|
|
3899
|
+
done();
|
|
3900
|
+
} catch (err) {
|
|
3901
|
+
log.error(`Test Failure: ${err}`);
|
|
3902
|
+
done(err);
|
|
3903
|
+
}
|
|
3904
|
+
});
|
|
3905
|
+
} catch (error) {
|
|
3906
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3907
|
+
done(error);
|
|
3908
|
+
}
|
|
3909
|
+
}).timeout(attemptTimeout);
|
|
3910
|
+
});
|
|
3911
|
+
|
|
3912
|
+
describe('#apiConfigGroupPolicyTeamDestroy - errors', () => {
|
|
3913
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3914
|
+
try {
|
|
3915
|
+
a.apiConfigGroupPolicyTeamDestroy(groupPolicyId, groupPolicyTeamId, (data, error) => {
|
|
3916
|
+
try {
|
|
3917
|
+
if (stub) {
|
|
3918
|
+
const displayE = 'Error 400 received on request';
|
|
3919
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3920
|
+
} else {
|
|
3921
|
+
runCommonAsserts(data, error);
|
|
3922
|
+
}
|
|
3923
|
+
saveMockData('GroupPolicy', 'apiConfigGroupPolicyTeamDestroy', 'default', data);
|
|
3924
|
+
done();
|
|
3925
|
+
} catch (err) {
|
|
3926
|
+
log.error(`Test Failure: ${err}`);
|
|
3927
|
+
done(err);
|
|
3928
|
+
}
|
|
3929
|
+
});
|
|
3930
|
+
} catch (error) {
|
|
3931
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3932
|
+
done(error);
|
|
3933
|
+
}
|
|
3934
|
+
}).timeout(attemptTimeout);
|
|
3935
|
+
});
|
|
3936
|
+
|
|
3937
|
+
describe('#apiConfigGroupPolicyVaultAccountDestroy - errors', () => {
|
|
3938
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3939
|
+
try {
|
|
3940
|
+
a.apiConfigGroupPolicyVaultAccountDestroy(groupPolicyId, groupPolicyAccountId, (data, error) => {
|
|
3941
|
+
try {
|
|
3942
|
+
if (stub) {
|
|
3943
|
+
const displayE = 'Error 400 received on request';
|
|
3944
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3945
|
+
} else {
|
|
3946
|
+
runCommonAsserts(data, error);
|
|
3947
|
+
}
|
|
3948
|
+
saveMockData('GroupPolicy', 'apiConfigGroupPolicyVaultAccountDestroy', 'default', data);
|
|
3949
|
+
done();
|
|
3950
|
+
} catch (err) {
|
|
3951
|
+
log.error(`Test Failure: ${err}`);
|
|
3952
|
+
done(err);
|
|
3953
|
+
}
|
|
3954
|
+
});
|
|
3955
|
+
} catch (error) {
|
|
3956
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3957
|
+
done(error);
|
|
3958
|
+
}
|
|
3959
|
+
}).timeout(attemptTimeout);
|
|
3960
|
+
});
|
|
3961
|
+
|
|
3962
|
+
describe('#apiConfigVaultAccountGroupDestroy - errors', () => {
|
|
3963
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3964
|
+
try {
|
|
3965
|
+
a.apiConfigVaultAccountGroupDestroy(vaultId, (data, error) => {
|
|
3966
|
+
try {
|
|
3967
|
+
if (stub) {
|
|
3968
|
+
const displayE = 'Error 400 received on request';
|
|
3969
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3970
|
+
} else {
|
|
3971
|
+
runCommonAsserts(data, error);
|
|
3972
|
+
}
|
|
3973
|
+
saveMockData('Vault', 'apiConfigVaultAccountGroupDestroy', 'default', data);
|
|
3974
|
+
done();
|
|
3975
|
+
} catch (err) {
|
|
3976
|
+
log.error(`Test Failure: ${err}`);
|
|
3977
|
+
done(err);
|
|
3978
|
+
}
|
|
3979
|
+
});
|
|
3980
|
+
} catch (error) {
|
|
3981
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3982
|
+
done(error);
|
|
3983
|
+
}
|
|
3984
|
+
}).timeout(attemptTimeout);
|
|
3985
|
+
});
|
|
3986
|
+
|
|
3987
|
+
describe('#apiConfigVaultAccountGroupAccountDestroy - errors', () => {
|
|
3988
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3989
|
+
try {
|
|
3990
|
+
a.apiConfigVaultAccountGroupAccountDestroy(vaultId, vaultAccountId, (data, error) => {
|
|
3991
|
+
try {
|
|
3992
|
+
if (stub) {
|
|
3993
|
+
const displayE = 'Error 400 received on request';
|
|
3994
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
3995
|
+
} else {
|
|
3996
|
+
runCommonAsserts(data, error);
|
|
3997
|
+
}
|
|
3998
|
+
saveMockData('Vault', 'apiConfigVaultAccountGroupAccountDestroy', 'default', data);
|
|
3999
|
+
done();
|
|
4000
|
+
} catch (err) {
|
|
4001
|
+
log.error(`Test Failure: ${err}`);
|
|
4002
|
+
done(err);
|
|
4003
|
+
}
|
|
4004
|
+
});
|
|
4005
|
+
} catch (error) {
|
|
4006
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4007
|
+
done(error);
|
|
4008
|
+
}
|
|
4009
|
+
}).timeout(attemptTimeout);
|
|
4010
|
+
});
|
|
4011
|
+
|
|
4012
|
+
describe('#apiConfigVaultAccountGroupUserDestroy - errors', () => {
|
|
4013
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
4014
|
+
try {
|
|
4015
|
+
a.apiConfigVaultAccountGroupUserDestroy(vaultId, vaultUserId, (data, error) => {
|
|
4016
|
+
try {
|
|
4017
|
+
if (stub) {
|
|
4018
|
+
const displayE = 'Error 400 received on request';
|
|
4019
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
4020
|
+
} else {
|
|
4021
|
+
runCommonAsserts(data, error);
|
|
4022
|
+
}
|
|
4023
|
+
saveMockData('Vault', 'apiConfigVaultAccountGroupUserDestroy', 'default', data);
|
|
4024
|
+
done();
|
|
4025
|
+
} catch (err) {
|
|
4026
|
+
log.error(`Test Failure: ${err}`);
|
|
4027
|
+
done(err);
|
|
4028
|
+
}
|
|
4029
|
+
});
|
|
4030
|
+
} catch (error) {
|
|
4031
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4032
|
+
done(error);
|
|
4033
|
+
}
|
|
4034
|
+
}).timeout(attemptTimeout);
|
|
4035
|
+
});
|
|
4036
|
+
|
|
4037
|
+
describe('#apiConfigVaultAccountPolicyDestroy - errors', () => {
|
|
4038
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
4039
|
+
try {
|
|
4040
|
+
a.apiConfigVaultAccountPolicyDestroy(vaultId, (data, error) => {
|
|
4041
|
+
try {
|
|
4042
|
+
if (stub) {
|
|
4043
|
+
const displayE = 'Error 400 received on request';
|
|
4044
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
4045
|
+
} else {
|
|
4046
|
+
runCommonAsserts(data, error);
|
|
4047
|
+
}
|
|
4048
|
+
saveMockData('Vault', 'apiConfigVaultAccountPolicyDestroy', 'default', data);
|
|
4049
|
+
done();
|
|
4050
|
+
} catch (err) {
|
|
4051
|
+
log.error(`Test Failure: ${err}`);
|
|
4052
|
+
done(err);
|
|
4053
|
+
}
|
|
4054
|
+
});
|
|
4055
|
+
} catch (error) {
|
|
4056
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4057
|
+
done(error);
|
|
4058
|
+
}
|
|
4059
|
+
}).timeout(attemptTimeout);
|
|
4060
|
+
});
|
|
4061
|
+
|
|
4062
|
+
describe('#apiConfigVaultAccountDestroy - errors', () => {
|
|
4063
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
4064
|
+
try {
|
|
4065
|
+
a.apiConfigVaultAccountDestroy(vaultId, (data, error) => {
|
|
4066
|
+
try {
|
|
4067
|
+
if (stub) {
|
|
4068
|
+
const displayE = 'Error 400 received on request';
|
|
4069
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
4070
|
+
} else {
|
|
4071
|
+
runCommonAsserts(data, error);
|
|
4072
|
+
}
|
|
4073
|
+
saveMockData('Vault', 'apiConfigVaultAccountDestroy', 'default', data);
|
|
4074
|
+
done();
|
|
4075
|
+
} catch (err) {
|
|
4076
|
+
log.error(`Test Failure: ${err}`);
|
|
4077
|
+
done(err);
|
|
4078
|
+
}
|
|
4079
|
+
});
|
|
4080
|
+
} catch (error) {
|
|
4081
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4082
|
+
done(error);
|
|
4083
|
+
}
|
|
4084
|
+
}).timeout(attemptTimeout);
|
|
4085
|
+
});
|
|
4086
|
+
|
|
4087
|
+
describe('#apiConfigVaultAccountUserDestroy - errors', () => {
|
|
4088
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
4089
|
+
try {
|
|
4090
|
+
a.apiConfigVaultAccountUserDestroy(vaultId, vaultUserId, (data, error) => {
|
|
4091
|
+
try {
|
|
4092
|
+
if (stub) {
|
|
4093
|
+
const displayE = 'Error 400 received on request';
|
|
4094
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
4095
|
+
} else {
|
|
4096
|
+
runCommonAsserts(data, error);
|
|
4097
|
+
}
|
|
4098
|
+
saveMockData('Vault', 'apiConfigVaultAccountUserDestroy', 'default', data);
|
|
4099
|
+
done();
|
|
4100
|
+
} catch (err) {
|
|
4101
|
+
log.error(`Test Failure: ${err}`);
|
|
4102
|
+
done(err);
|
|
4103
|
+
}
|
|
4104
|
+
});
|
|
4105
|
+
} catch (error) {
|
|
4106
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4107
|
+
done(error);
|
|
4108
|
+
}
|
|
4109
|
+
}).timeout(attemptTimeout);
|
|
4110
|
+
});
|
|
4111
|
+
|
|
4112
|
+
describe('#apiConfigVendorDestroy - errors', () => {
|
|
4113
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
4114
|
+
try {
|
|
4115
|
+
a.apiConfigVendorDestroy(vendorId, (data, error) => {
|
|
4116
|
+
try {
|
|
4117
|
+
if (stub) {
|
|
4118
|
+
const displayE = 'Error 400 received on request';
|
|
4119
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
4120
|
+
} else {
|
|
4121
|
+
runCommonAsserts(data, error);
|
|
4122
|
+
}
|
|
4123
|
+
saveMockData('Vendor', 'apiConfigVendorDestroy', 'default', data);
|
|
4124
|
+
done();
|
|
4125
|
+
} catch (err) {
|
|
4126
|
+
log.error(`Test Failure: ${err}`);
|
|
4127
|
+
done(err);
|
|
4128
|
+
}
|
|
4129
|
+
});
|
|
4130
|
+
} catch (error) {
|
|
4131
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4132
|
+
done(error);
|
|
4133
|
+
}
|
|
4134
|
+
}).timeout(attemptTimeout);
|
|
4135
|
+
});
|
|
4136
|
+
|
|
4137
|
+
describe('#apiConfigVendorUserDestroy - errors', () => {
|
|
4138
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
4139
|
+
try {
|
|
4140
|
+
a.apiConfigVendorUserDestroy(vendorId, vendorUserId, (data, error) => {
|
|
4141
|
+
try {
|
|
4142
|
+
if (stub) {
|
|
4143
|
+
const displayE = 'Error 400 received on request';
|
|
4144
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-beyond_trust-connectorRest-handleEndResponse', displayE);
|
|
4145
|
+
} else {
|
|
4146
|
+
runCommonAsserts(data, error);
|
|
4147
|
+
}
|
|
4148
|
+
saveMockData('Vendor', 'apiConfigVendorUserDestroy', 'default', data);
|
|
4149
|
+
done();
|
|
4150
|
+
} catch (err) {
|
|
4151
|
+
log.error(`Test Failure: ${err}`);
|
|
4152
|
+
done(err);
|
|
4153
|
+
}
|
|
4154
|
+
});
|
|
4155
|
+
} catch (error) {
|
|
4156
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4157
|
+
done(error);
|
|
4158
|
+
}
|
|
4159
|
+
}).timeout(attemptTimeout);
|
|
4160
|
+
});
|
|
4161
|
+
});
|
|
4162
|
+
});
|