@rockcarver/frodo-lib 0.17.2-0 → 0.17.3
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/CHANGELOG.md +9 -1
- package/cjs/api/AgentApi.js +1 -1
- package/cjs/api/AgentApi.js.map +1 -1
- package/cjs/api/AgentApi.test.js.map +1 -1
- package/cjs/api/ApiTypes.js +16 -16
- package/cjs/api/ApiTypes.js.map +1 -1
- package/cjs/api/AuthenticateApi.js +17 -12
- package/cjs/api/AuthenticateApi.js.map +1 -1
- package/cjs/api/AuthenticateApi.test.js.map +1 -1
- package/cjs/api/IdmConfigApi.js +28 -7
- package/cjs/api/IdmConfigApi.js.map +1 -1
- package/cjs/api/NodeApi.test.js.map +1 -1
- package/cjs/api/SecretsApi.test.js.map +1 -1
- package/cjs/api/SocialIdentityProvidersApi.js +22 -0
- package/cjs/api/SocialIdentityProvidersApi.js.map +1 -1
- package/cjs/api/TreeApi.test.js.map +1 -1
- package/cjs/api/VariablesApi.test.js.map +1 -1
- package/cjs/api/utils/ApiUtils.js +13 -4
- package/cjs/api/utils/ApiUtils.js.map +1 -1
- package/cjs/api/utils/ApiUtils.test.js.map +1 -1
- package/cjs/index.js +3 -1
- package/cjs/index.js.map +1 -1
- package/cjs/ops/AgentOps.test.js.map +1 -1
- package/cjs/ops/AuthenticateOps.js +0 -7
- package/cjs/ops/AuthenticateOps.js.map +1 -1
- package/cjs/ops/ConnectionProfileOps.test.js.map +1 -1
- package/cjs/ops/EmailTemplateOps.test.js.map +1 -1
- package/cjs/ops/IdmOps.test.js.map +1 -1
- package/cjs/ops/IdpOps.js +182 -275
- package/cjs/ops/IdpOps.js.map +1 -1
- package/cjs/ops/IdpOps.test.js.map +1 -1
- package/cjs/ops/SecretsOps.js +3 -3
- package/cjs/ops/SecretsOps.js.map +1 -1
- package/cjs/ops/VariablesOps.js +3 -3
- package/cjs/ops/VariablesOps.js.map +1 -1
- package/cjs/shared/State.js +1 -1
- package/cjs/shared/State.js.map +1 -1
- package/{esm/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/ig_mytestrun_com.json → cjs/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoOpsTestGatewayAgent1.json} +0 -2
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/{ig_chico.json → FrodoOpsTestGatewayAgent2.json} +0 -2
- package/{esm/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/ig_chico.json → cjs/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoOpsTestGatewayAgent3.json} +0 -2
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/{ig_mytestrun_com.json → FrodoOpsTestGatewayAgent4.json} +0 -2
- package/{esm/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/api_client.json → cjs/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoOpsTestGatewayAgent5.json} +0 -2
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/{api_client.json → FrodoOpsTestGatewayAgent6.json} +0 -2
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoOpsTestGatewayAgent7.json +20 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoOpsTestGatewayAgent8.json +20 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoOpsTestGatewayAgent9.json +30 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoTestGatewayAgent1.json +30 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoTestGatewayAgent2.json +20 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoTestGatewayAgent3.json +20 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/{javaAgent.json → FrodoOpsTestJavaAgent1.json} +0 -2
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/{tomcatagent.json → FrodoOpsTestJavaAgent2.json} +0 -2
- package/{esm/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/tomcatagent.json → cjs/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoOpsTestJavaAgent3.json} +0 -2
- package/{esm/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/javaAgent.json → cjs/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoOpsTestJavaAgent4.json} +0 -2
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoOpsTestJavaAgent5.json +621 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoOpsTestJavaAgent6.json +628 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoOpsTestJavaAgent7.json +628 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoOpsTestJavaAgent8.json +628 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoOpsTestJavaAgent9.json +628 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoTestJavaAgent1.json +621 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoTestJavaAgent2.json +628 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoTestJavaAgent3.json +628 -0
- package/{esm/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/apacheagent.json → cjs/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoOpsTestWebAgent1.json} +0 -2
- package/{esm/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/webserver.json → cjs/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoOpsTestWebAgent2.json} +0 -2
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/{webserver.json → FrodoOpsTestWebAgent3.json} +0 -2
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/{apacheagent.json → FrodoOpsTestWebAgent4.json} +0 -2
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoOpsTestWebAgent5.json +454 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoOpsTestWebAgent6.json +453 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoOpsTestWebAgent7.json +453 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoOpsTestWebAgent8.json +453 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoOpsTestWebAgent9.json +453 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoTestWebAgent1.json +454 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoTestWebAgent2.json +453 -0
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoTestWebAgent3.json +453 -0
- package/cjs/test/mocks/ForgeRockApiMockEngine.js +1 -108
- package/cjs/test/mocks/ForgeRockApiMockEngine.js.map +1 -1
- package/esm/api/AgentApi.mjs +1 -1
- package/esm/api/AgentApi.test.mjs +323 -246
- package/esm/api/ApiTypes.mjs +16 -16
- package/esm/api/AuthenticateApi.mjs +16 -12
- package/esm/api/AuthenticateApi.test.mjs +77 -35
- package/esm/api/IdmConfigApi.mjs +19 -4
- package/esm/api/NodeApi.test.mjs +248 -914
- package/esm/api/SecretsApi.test.mjs +252 -245
- package/esm/api/SocialIdentityProvidersApi.mjs +16 -0
- package/esm/api/TreeApi.test.mjs +190 -105
- package/esm/api/VariablesApi.test.mjs +108 -12
- package/esm/api/utils/ApiUtils.mjs +12 -4
- package/esm/api/utils/ApiUtils.test.mjs +80 -79
- package/esm/index.mjs +1 -0
- package/esm/ops/AgentOps.test.mjs +780 -1210
- package/esm/ops/AuthenticateOps.mjs +0 -7
- package/esm/ops/ConnectionProfileOps.test.mjs +94 -54
- package/esm/ops/EmailTemplateOps.test.mjs +140 -28
- package/esm/ops/IdmOps.test.mjs +159 -62
- package/esm/ops/IdpOps.mjs +139 -210
- package/esm/ops/IdpOps.test.mjs +651 -52
- package/esm/ops/SecretsOps.mjs +3 -3
- package/esm/ops/VariablesOps.mjs +3 -3
- package/esm/shared/State.mjs +1 -1
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoOpsTestGatewayAgent1.json +30 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoOpsTestGatewayAgent2.json +20 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoOpsTestGatewayAgent3.json +20 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoOpsTestGatewayAgent4.json +30 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoOpsTestGatewayAgent5.json +20 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoOpsTestGatewayAgent6.json +20 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoOpsTestGatewayAgent7.json +20 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoOpsTestGatewayAgent8.json +20 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoOpsTestGatewayAgent9.json +30 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoTestGatewayAgent1.json +30 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoTestGatewayAgent2.json +20 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/FrodoTestGatewayAgent3.json +20 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoOpsTestJavaAgent1.json +621 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoOpsTestJavaAgent2.json +628 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoOpsTestJavaAgent3.json +628 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoOpsTestJavaAgent4.json +621 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoOpsTestJavaAgent5.json +621 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoOpsTestJavaAgent6.json +628 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoOpsTestJavaAgent7.json +628 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoOpsTestJavaAgent8.json +628 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoOpsTestJavaAgent9.json +628 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoTestJavaAgent1.json +621 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoTestJavaAgent2.json +628 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/J2EEAgent/FrodoTestJavaAgent3.json +628 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoOpsTestWebAgent1.json +454 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoOpsTestWebAgent2.json +453 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoOpsTestWebAgent3.json +453 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoOpsTestWebAgent4.json +454 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoOpsTestWebAgent5.json +454 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoOpsTestWebAgent6.json +453 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoOpsTestWebAgent7.json +453 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoOpsTestWebAgent8.json +453 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoOpsTestWebAgent9.json +453 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoTestWebAgent1.json +454 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoTestWebAgent2.json +453 -0
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/WebAgent/FrodoTestWebAgent3.json +453 -0
- package/esm/test/mocks/ForgeRockApiMockEngine.mjs +1 -98
- package/package.json +1 -1
- package/types/api/AgentApi.d.ts.map +1 -1
- package/types/api/ApiTypes.d.ts +21 -21
- package/types/api/ApiTypes.d.ts.map +1 -1
- package/types/api/AuthenticateApi.d.ts +11 -2
- package/types/api/AuthenticateApi.d.ts.map +1 -1
- package/types/api/IdmConfigApi.d.ts +11 -5
- package/types/api/IdmConfigApi.d.ts.map +1 -1
- package/types/api/SocialIdentityProvidersApi.d.ts +7 -0
- package/types/api/SocialIdentityProvidersApi.d.ts.map +1 -1
- package/types/api/utils/ApiUtils.d.ts +7 -1
- package/types/api/utils/ApiUtils.d.ts.map +1 -1
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
- package/types/ops/AuthenticateOps.d.ts.map +1 -1
- package/types/ops/IdpOps.d.ts +31 -24
- package/types/ops/IdpOps.d.ts.map +1 -1
- package/types/ops/SecretsOps.d.ts.map +1 -1
- package/types/ops/VariablesOps.d.ts.map +1 -1
- package/types/shared/State.d.ts.map +1 -1
- package/types/test/mocks/ForgeRockApiMockEngine.d.ts +1 -11
- package/types/test/mocks/ForgeRockApiMockEngine.d.ts.map +1 -1
- package/cjs/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/ajays_client.json +0 -22
- package/esm/test/mocks/AgentApi/getAgentByTypeAndId/IdentityGatewayAgent/ajays_client.json +0 -22
|
@@ -1,266 +1,343 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
1
|
+
/**
|
|
2
|
+
* To record and update snapshots, you must perform 3 steps in order:
|
|
3
|
+
*
|
|
4
|
+
* 1. Record API responses & update ESM snapshots
|
|
5
|
+
*
|
|
6
|
+
* To record and update ESM snapshots, you must call the test:record
|
|
7
|
+
* script and override all the connection state variables required
|
|
8
|
+
* to connect to the env to record from:
|
|
9
|
+
*
|
|
10
|
+
* FRODO_DEBUG=1 FRODO_HOST=frodo-dev npm run test:record AgentApi
|
|
11
|
+
*
|
|
12
|
+
* The above command assumes that you have a connection profile for
|
|
13
|
+
* 'volker-dev' on your development machine.
|
|
14
|
+
*
|
|
15
|
+
* 2. Update CJS snapshots
|
|
16
|
+
*
|
|
17
|
+
* After recording, the ESM snapshots will already be updated as that happens
|
|
18
|
+
* in one go, but you must manually update the CJS snapshots by running:
|
|
19
|
+
*
|
|
20
|
+
* FRODO_DEBUG=1 npm run test:update AgentApi
|
|
21
|
+
*
|
|
22
|
+
* 3. Test your changes
|
|
23
|
+
*
|
|
24
|
+
* If 1 and 2 didn't produce any errors, you are ready to run the tests in
|
|
25
|
+
* replay mode and make sure they all succeed as well:
|
|
26
|
+
*
|
|
27
|
+
* npm run test:only AgentApi
|
|
28
|
+
*
|
|
29
|
+
* Note: FRODO_DEBUG=1 is optional and enables debug logging for some output
|
|
30
|
+
* in case things don't function as expected
|
|
31
|
+
*/
|
|
32
|
+
import { jest } from '@jest/globals';
|
|
33
|
+
import { AgentRaw } from '../index';
|
|
34
|
+
import { getAgent } from '../test/mocks/ForgeRockApiMockEngine';
|
|
35
|
+
import { autoSetupPolly } from '../utils/AutoSetupPolly';
|
|
36
|
+
|
|
37
|
+
// Increase timeout for this test as pipeline keeps failing with error:
|
|
38
|
+
// Timeout - Async callback was not invoked within the 5000 ms timeout specified by jest.setTimeout.
|
|
39
|
+
jest.setTimeout(30000);
|
|
40
|
+
autoSetupPolly();
|
|
41
|
+
describe('AgentApi', () => {
|
|
42
|
+
const gateway1 = {
|
|
43
|
+
id: 'FrodoTestGatewayAgent1',
|
|
44
|
+
type: 'IdentityGatewayAgent'
|
|
45
|
+
};
|
|
46
|
+
const gateway2 = {
|
|
47
|
+
id: 'FrodoTestGatewayAgent2',
|
|
48
|
+
type: 'IdentityGatewayAgent'
|
|
49
|
+
};
|
|
50
|
+
const gateway3 = {
|
|
51
|
+
id: 'FrodoTestGatewayAgent3',
|
|
52
|
+
type: 'IdentityGatewayAgent'
|
|
53
|
+
};
|
|
54
|
+
const java1 = {
|
|
55
|
+
id: 'FrodoTestJavaAgent1',
|
|
56
|
+
type: 'J2EEAgent'
|
|
57
|
+
};
|
|
58
|
+
const java2 = {
|
|
59
|
+
id: 'FrodoTestJavaAgent2',
|
|
60
|
+
type: 'J2EEAgent'
|
|
61
|
+
};
|
|
62
|
+
const java3 = {
|
|
63
|
+
id: 'FrodoTestJavaAgent3',
|
|
64
|
+
type: 'J2EEAgent'
|
|
65
|
+
};
|
|
66
|
+
const web1 = {
|
|
67
|
+
id: 'FrodoTestWebAgent1',
|
|
68
|
+
type: 'WebAgent'
|
|
69
|
+
};
|
|
70
|
+
const web2 = {
|
|
71
|
+
id: 'FrodoTestWebAgent2',
|
|
72
|
+
type: 'WebAgent'
|
|
73
|
+
};
|
|
74
|
+
const web3 = {
|
|
75
|
+
id: 'FrodoTestWebAgent3',
|
|
76
|
+
type: 'WebAgent'
|
|
77
|
+
};
|
|
78
|
+
// in recording mode, setup test data before recording
|
|
79
|
+
beforeAll(async () => {
|
|
80
|
+
if (process.env.FRODO_POLLY_MODE === 'record') {
|
|
81
|
+
// setup gateway1 - delete if exists, then create
|
|
82
|
+
try {
|
|
83
|
+
await AgentRaw.getAgentByTypeAndId(gateway1.type, gateway1.id);
|
|
84
|
+
await AgentRaw.deleteAgentByTypeAndId(gateway1.type, gateway1.id);
|
|
85
|
+
} catch (error) {
|
|
86
|
+
// ignore
|
|
87
|
+
} finally {
|
|
88
|
+
await AgentRaw.putAgentByTypeAndId(gateway1.type, gateway1.id, getAgent(gateway1.type, gateway1.id));
|
|
89
|
+
}
|
|
90
|
+
// setup gateway2 - delete if exists
|
|
91
|
+
try {
|
|
92
|
+
await AgentRaw.getAgentByTypeAndId(gateway2.type, gateway2.id);
|
|
93
|
+
await AgentRaw.deleteAgentByTypeAndId(gateway2.type, gateway2.id);
|
|
94
|
+
} catch (error) {
|
|
95
|
+
// ignore
|
|
96
|
+
}
|
|
97
|
+
// setup gateway3 - delete if exists, then create
|
|
98
|
+
try {
|
|
99
|
+
await AgentRaw.getAgentByTypeAndId(gateway3.type, gateway3.id);
|
|
100
|
+
await AgentRaw.deleteAgentByTypeAndId(gateway3.type, gateway3.id);
|
|
101
|
+
} catch (error) {
|
|
102
|
+
// ignore
|
|
103
|
+
} finally {
|
|
104
|
+
await AgentRaw.putAgentByTypeAndId(gateway3.type, gateway3.id, getAgent(gateway3.type, gateway3.id));
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// setup java1 - delete if exists, then create
|
|
108
|
+
try {
|
|
109
|
+
await AgentRaw.getAgentByTypeAndId(java1.type, java1.id);
|
|
110
|
+
await AgentRaw.deleteAgentByTypeAndId(java1.type, java1.id);
|
|
111
|
+
} catch (error) {
|
|
112
|
+
// ignore
|
|
113
|
+
} finally {
|
|
114
|
+
await AgentRaw.putAgentByTypeAndId(java1.type, java1.id, getAgent(java1.type, java1.id));
|
|
115
|
+
}
|
|
116
|
+
// setup java2 - delete if exists
|
|
117
|
+
try {
|
|
118
|
+
await AgentRaw.getAgentByTypeAndId(java2.type, java2.id);
|
|
119
|
+
await AgentRaw.deleteAgentByTypeAndId(java2.type, java2.id);
|
|
120
|
+
} catch (error) {
|
|
121
|
+
// ignore
|
|
122
|
+
}
|
|
123
|
+
// setup java3 - delete if exists, then create
|
|
124
|
+
try {
|
|
125
|
+
await AgentRaw.getAgentByTypeAndId(java3.type, java3.id);
|
|
126
|
+
await AgentRaw.deleteAgentByTypeAndId(java3.type, java3.id);
|
|
127
|
+
} catch (error) {
|
|
128
|
+
// ignore
|
|
129
|
+
} finally {
|
|
130
|
+
await AgentRaw.putAgentByTypeAndId(java3.type, java3.id, getAgent(java3.type, java3.id));
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// setup web1 - delete if exists, then create
|
|
134
|
+
try {
|
|
135
|
+
await AgentRaw.getAgentByTypeAndId(web1.type, web1.id);
|
|
136
|
+
await AgentRaw.deleteAgentByTypeAndId(web1.type, web1.id);
|
|
137
|
+
} catch (error) {
|
|
138
|
+
// ignore
|
|
139
|
+
} finally {
|
|
140
|
+
await AgentRaw.putAgentByTypeAndId(web1.type, web1.id, getAgent(web1.type, web1.id));
|
|
141
|
+
}
|
|
142
|
+
// setup web2 - delete if exists
|
|
143
|
+
try {
|
|
144
|
+
await AgentRaw.getAgentByTypeAndId(web2.type, web2.id);
|
|
145
|
+
await AgentRaw.deleteAgentByTypeAndId(web2.type, web2.id);
|
|
146
|
+
} catch (error) {
|
|
147
|
+
// ignore
|
|
148
|
+
}
|
|
149
|
+
// setup web3 - delete if exists, then create
|
|
150
|
+
try {
|
|
151
|
+
await AgentRaw.getAgentByTypeAndId(web3.type, web3.id);
|
|
152
|
+
await AgentRaw.deleteAgentByTypeAndId(web3.type, web3.id);
|
|
153
|
+
} catch (error) {
|
|
154
|
+
// ignore
|
|
155
|
+
} finally {
|
|
156
|
+
await AgentRaw.putAgentByTypeAndId(web3.type, web3.id, getAgent(web3.type, web3.id));
|
|
157
|
+
}
|
|
51
158
|
}
|
|
52
159
|
});
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
160
|
+
// in recording mode, remove test data after recording
|
|
161
|
+
afterAll(async () => {
|
|
162
|
+
if (process.env.FRODO_POLLY_MODE === 'record') {
|
|
163
|
+
try {
|
|
164
|
+
await AgentRaw.getAgentByTypeAndId(gateway1.type, gateway1.id);
|
|
165
|
+
await AgentRaw.deleteAgentByTypeAndId(gateway1.type, gateway1.id);
|
|
166
|
+
} catch (error) {
|
|
167
|
+
// ignore
|
|
168
|
+
}
|
|
169
|
+
try {
|
|
170
|
+
await AgentRaw.getAgentByTypeAndId(gateway2.type, gateway2.id);
|
|
171
|
+
await AgentRaw.deleteAgentByTypeAndId(gateway2.type, gateway2.id);
|
|
172
|
+
} catch (error) {
|
|
173
|
+
// ignore
|
|
174
|
+
}
|
|
175
|
+
try {
|
|
176
|
+
await AgentRaw.getAgentByTypeAndId(gateway3.type, gateway3.id);
|
|
177
|
+
await AgentRaw.deleteAgentByTypeAndId(gateway3.type, gateway3.id);
|
|
178
|
+
} catch (error) {
|
|
179
|
+
// ignore
|
|
180
|
+
}
|
|
181
|
+
try {
|
|
182
|
+
await AgentRaw.getAgentByTypeAndId(java1.type, java1.id);
|
|
183
|
+
await AgentRaw.deleteAgentByTypeAndId(java1.type, java1.id);
|
|
184
|
+
} catch (error) {
|
|
185
|
+
// ignore
|
|
186
|
+
}
|
|
187
|
+
try {
|
|
188
|
+
await AgentRaw.getAgentByTypeAndId(java2.type, java2.id);
|
|
189
|
+
await AgentRaw.deleteAgentByTypeAndId(java2.type, java2.id);
|
|
190
|
+
} catch (error) {
|
|
191
|
+
// ignore
|
|
192
|
+
}
|
|
193
|
+
try {
|
|
194
|
+
await AgentRaw.getAgentByTypeAndId(java3.type, java3.id);
|
|
195
|
+
await AgentRaw.deleteAgentByTypeAndId(java3.type, java3.id);
|
|
196
|
+
} catch (error) {
|
|
197
|
+
// ignore
|
|
198
|
+
}
|
|
199
|
+
try {
|
|
200
|
+
await AgentRaw.getAgentByTypeAndId(web1.type, web1.id);
|
|
201
|
+
await AgentRaw.deleteAgentByTypeAndId(web1.type, web1.id);
|
|
202
|
+
} catch (error) {
|
|
203
|
+
// ignore
|
|
204
|
+
}
|
|
205
|
+
try {
|
|
206
|
+
await AgentRaw.getAgentByTypeAndId(web2.type, web2.id);
|
|
207
|
+
await AgentRaw.deleteAgentByTypeAndId(web2.type, web2.id);
|
|
208
|
+
} catch (error) {
|
|
209
|
+
// ignore
|
|
210
|
+
}
|
|
211
|
+
try {
|
|
212
|
+
await AgentRaw.getAgentByTypeAndId(web3.type, web3.id);
|
|
213
|
+
await AgentRaw.deleteAgentByTypeAndId(web3.type, web3.id);
|
|
214
|
+
} catch (error) {
|
|
215
|
+
// ignore
|
|
216
|
+
}
|
|
63
217
|
}
|
|
64
218
|
});
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
expect.assertions(3);
|
|
74
|
-
const agents = await AgentRaw.getAgents();
|
|
75
|
-
expect(agents).toBeTruthy();
|
|
76
|
-
expect((_agents$result4 = agents.result) === null || _agents$result4 === void 0 ? void 0 : _agents$result4.length).toBe(39);
|
|
77
|
-
});
|
|
78
|
-
});
|
|
79
|
-
describe('AgentApi - findAgentById()', () => {
|
|
80
|
-
test('findAgentById() 0: Method is implemented', async () => {
|
|
81
|
-
expect(AgentRaw.findAgentById).toBeDefined();
|
|
82
|
-
});
|
|
83
|
-
test('findAgentById() 1: Find agent "ig_mytestrun_com"', async () => {
|
|
84
|
-
mockFindAgentById(mock);
|
|
85
|
-
expect.assertions(3);
|
|
86
|
-
const agentId = 'ig_mytestrun_com';
|
|
87
|
-
const agents = await AgentRaw.findAgentById(agentId);
|
|
88
|
-
expect(agents).toBeTruthy();
|
|
89
|
-
expect(agents.length).toBe(1);
|
|
90
|
-
});
|
|
91
|
-
test('findAgentById() 2: Find agent "tomcatagent"', async () => {
|
|
92
|
-
mockFindAgentById(mock);
|
|
93
|
-
expect.assertions(3);
|
|
94
|
-
const agentId = 'tomcatagent';
|
|
95
|
-
const agents = await AgentRaw.findAgentById(agentId);
|
|
96
|
-
expect(agents).toBeTruthy();
|
|
97
|
-
expect(agents.length).toBe(1);
|
|
98
|
-
});
|
|
99
|
-
test('findAgentById() 3: Find agent "apacheagent"', async () => {
|
|
100
|
-
mockFindAgentById(mock);
|
|
101
|
-
expect.assertions(3);
|
|
102
|
-
const agentId = 'apacheagent';
|
|
103
|
-
const agents = await AgentRaw.findAgentById(agentId);
|
|
104
|
-
expect(agents).toBeTruthy();
|
|
105
|
-
expect(agents.length).toBe(1);
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
describe('AgentApi - findAgentByTypeAndId()', () => {
|
|
109
|
-
test('findAgentByTypeAndId() 0: Method is implemented', async () => {
|
|
110
|
-
expect(AgentRaw.findAgentByTypeAndId).toBeDefined();
|
|
111
|
-
});
|
|
112
|
-
test('findAgentByTypeAndId() 1: Find gateway agent "ig_mytestrun_com"', async () => {
|
|
113
|
-
mockFindAgentByTypeAndId(mock);
|
|
114
|
-
expect.assertions(3);
|
|
115
|
-
const agentType = 'IdentityGatewayAgent';
|
|
116
|
-
const agentId = 'ig_mytestrun_com';
|
|
117
|
-
const agents = await AgentRaw.findAgentByTypeAndId(agentType, agentId);
|
|
118
|
-
expect(agents).toBeTruthy();
|
|
119
|
-
expect(agents.length).toBe(1);
|
|
120
|
-
});
|
|
121
|
-
test('findAgentByTypeAndId() 2: Find java agent "tomcatagent"', async () => {
|
|
122
|
-
mockFindAgentByTypeAndId(mock);
|
|
123
|
-
expect.assertions(3);
|
|
124
|
-
const agentType = 'J2EEAgent';
|
|
125
|
-
const agentId = 'tomcatagent';
|
|
126
|
-
const agents = await AgentRaw.findAgentByTypeAndId(agentType, agentId);
|
|
127
|
-
expect(agents).toBeTruthy();
|
|
128
|
-
expect(agents.length).toBe(1);
|
|
129
|
-
});
|
|
130
|
-
test('findAgentByTypeAndId() 3: Find web agent "apacheagent"', async () => {
|
|
131
|
-
mockFindAgentByTypeAndId(mock);
|
|
132
|
-
expect.assertions(3);
|
|
133
|
-
const agentType = 'WebAgent';
|
|
134
|
-
const agentId = 'apacheagent';
|
|
135
|
-
const agents = await AgentRaw.findAgentByTypeAndId(agentType, agentId);
|
|
136
|
-
expect(agents).toBeTruthy();
|
|
137
|
-
expect(agents.length).toBe(1);
|
|
138
|
-
});
|
|
139
|
-
});
|
|
140
|
-
describe('AgentApi - getAgentByTypeAndId()', () => {
|
|
141
|
-
test('getAgentByTypeAndId() 0: Method is implemented', async () => {
|
|
142
|
-
expect(AgentRaw.getAgentByTypeAndId).toBeDefined();
|
|
143
|
-
});
|
|
144
|
-
test('getAgentByTypeAndId() 1: Get gateway agent "ig_mytestrun_com"', async () => {
|
|
145
|
-
mockGetAgentByTypeAndId(mock);
|
|
146
|
-
expect.assertions(3);
|
|
147
|
-
const agentType = 'IdentityGatewayAgent';
|
|
148
|
-
const agentId = 'ig_mytestrun_com';
|
|
149
|
-
const agent = await AgentRaw.getAgentByTypeAndId(agentType, agentId);
|
|
150
|
-
expect(agent).toBeTruthy();
|
|
151
|
-
expect(agent._id).toBe(agentId);
|
|
152
|
-
});
|
|
153
|
-
test('getAgentByTypeAndId() 2: Get java agent "tomcatagent"', async () => {
|
|
154
|
-
mockGetAgentByTypeAndId(mock);
|
|
155
|
-
expect.assertions(3);
|
|
156
|
-
const agentType = 'J2EEAgent';
|
|
157
|
-
const agentId = 'tomcatagent';
|
|
158
|
-
const agent = await AgentRaw.getAgentByTypeAndId(agentType, agentId);
|
|
159
|
-
expect(agent).toBeTruthy();
|
|
160
|
-
expect(agent._id).toBe(agentId);
|
|
161
|
-
});
|
|
162
|
-
test('getAgentByTypeAndId() 3: Get web agent "apacheagent"', async () => {
|
|
163
|
-
mockGetAgentByTypeAndId(mock);
|
|
164
|
-
expect.assertions(3);
|
|
165
|
-
const agentType = 'WebAgent';
|
|
166
|
-
const agentId = 'apacheagent';
|
|
167
|
-
const agent = await AgentRaw.getAgentByTypeAndId(agentType, agentId);
|
|
168
|
-
expect(agent).toBeTruthy();
|
|
169
|
-
expect(agent._id).toBe(agentId);
|
|
170
|
-
});
|
|
171
|
-
});
|
|
172
|
-
describe('AgentApi - putAgentByTypeAndId()', () => {
|
|
173
|
-
test('putAgentByTypeAndId() 0: Method is implemented', async () => {
|
|
174
|
-
expect(AgentRaw.putAgentByTypeAndId).toBeDefined();
|
|
219
|
+
describe('getAgentTypes()', () => {
|
|
220
|
+
test('0: Method is implemented', async () => {
|
|
221
|
+
expect(AgentRaw.getAgentTypes).toBeDefined();
|
|
222
|
+
});
|
|
223
|
+
test('1: Get all agent types', async () => {
|
|
224
|
+
const response = await AgentRaw.getAgentTypes();
|
|
225
|
+
expect(response).toMatchSnapshot();
|
|
226
|
+
});
|
|
175
227
|
});
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
expect(
|
|
228
|
+
describe('getAgentsByType()', () => {
|
|
229
|
+
test('0: Method is implemented', async () => {
|
|
230
|
+
expect(AgentRaw.getAgentsByType).toBeDefined();
|
|
231
|
+
});
|
|
232
|
+
test('1: Get all gateway agents', async () => {
|
|
233
|
+
const agentType = 'IdentityGatewayAgent';
|
|
234
|
+
const response = await AgentRaw.getAgentsByType(agentType);
|
|
235
|
+
expect(response).toMatchSnapshot();
|
|
236
|
+
});
|
|
237
|
+
test('2: Get all java agents', async () => {
|
|
238
|
+
const agentType = 'J2EEAgent';
|
|
239
|
+
const response = await AgentRaw.getAgentsByType(agentType);
|
|
240
|
+
expect(response).toMatchSnapshot();
|
|
241
|
+
});
|
|
242
|
+
test('3: Get all web agents', async () => {
|
|
243
|
+
const agentType = 'WebAgent';
|
|
244
|
+
const response = await AgentRaw.getAgentsByType(agentType);
|
|
245
|
+
expect(response).toMatchSnapshot();
|
|
184
246
|
});
|
|
185
|
-
expect.assertions(5);
|
|
186
|
-
const agent = await AgentRaw.putAgentByTypeAndId(agentType, agentId, agentData);
|
|
187
|
-
expect(agent).toBeTruthy();
|
|
188
|
-
expect(agent._id).toBe(agentId);
|
|
189
247
|
});
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
expect(
|
|
197
|
-
expect(isEqualJson(mockAgentObj, agentData, ['_rev'])).toBeTruthy();
|
|
248
|
+
describe('getAgents()', () => {
|
|
249
|
+
test('0: Method is implemented', async () => {
|
|
250
|
+
expect(AgentRaw.getAgents).toBeDefined();
|
|
251
|
+
});
|
|
252
|
+
test('1: Get all agents', async () => {
|
|
253
|
+
const response = await AgentRaw.getAgents();
|
|
254
|
+
expect(response).toMatchSnapshot();
|
|
198
255
|
});
|
|
199
|
-
expect.assertions(5);
|
|
200
|
-
const agent = await AgentRaw.putAgentByTypeAndId(agentType, agentId, agentData);
|
|
201
|
-
expect(agent).toBeTruthy();
|
|
202
|
-
expect(agent._id).toBe(agentId);
|
|
203
256
|
});
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
expect(
|
|
211
|
-
|
|
257
|
+
describe('findAgentById()', () => {
|
|
258
|
+
test('0: Method is implemented', async () => {
|
|
259
|
+
expect(AgentRaw.findAgentById).toBeDefined();
|
|
260
|
+
});
|
|
261
|
+
test(`1: Find agent '${gateway1.id}'`, async () => {
|
|
262
|
+
const response = await AgentRaw.findAgentById(gateway1.id);
|
|
263
|
+
expect(response).toMatchSnapshot();
|
|
264
|
+
});
|
|
265
|
+
test(`2: Find agent '${java1.id}'`, async () => {
|
|
266
|
+
const response = await AgentRaw.findAgentById(java1.id);
|
|
267
|
+
expect(response).toMatchSnapshot();
|
|
268
|
+
});
|
|
269
|
+
test(`3: Find agent '${web1.id}'`, async () => {
|
|
270
|
+
const response = await AgentRaw.findAgentById(web1.id);
|
|
271
|
+
expect(response).toMatchSnapshot();
|
|
212
272
|
});
|
|
213
|
-
expect.assertions(5);
|
|
214
|
-
const agent = await AgentRaw.putAgentByTypeAndId(agentType, agentId, agentData);
|
|
215
|
-
expect(agent).toBeTruthy();
|
|
216
|
-
expect(agent._id).toBe(agentId);
|
|
217
273
|
});
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
274
|
+
describe('findAgentByTypeAndId()', () => {
|
|
275
|
+
test('0: Method is implemented', async () => {
|
|
276
|
+
expect(AgentRaw.findAgentByTypeAndId).toBeDefined();
|
|
277
|
+
});
|
|
278
|
+
test(`1: Find ${gateway1.type} '${gateway1.id}'`, async () => {
|
|
279
|
+
const response = await AgentRaw.findAgentByTypeAndId(gateway1.type, gateway1.id);
|
|
280
|
+
expect(response).toMatchSnapshot();
|
|
281
|
+
});
|
|
282
|
+
test(`2: Find ${java1.type} '${java1.id}'`, async () => {
|
|
283
|
+
const response = await AgentRaw.findAgentByTypeAndId(java1.type, java1.id);
|
|
284
|
+
expect(response).toMatchSnapshot();
|
|
285
|
+
});
|
|
286
|
+
test(`3: Find ${web1.type} '${web1.id}'`, async () => {
|
|
287
|
+
const response = await AgentRaw.findAgentByTypeAndId(web1.type, web1.id);
|
|
288
|
+
expect(response).toMatchSnapshot();
|
|
289
|
+
});
|
|
222
290
|
});
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
expect(
|
|
230
|
-
|
|
291
|
+
describe('getAgentByTypeAndId()', () => {
|
|
292
|
+
test('0: Method is implemented', async () => {
|
|
293
|
+
expect(AgentRaw.getAgentByTypeAndId).toBeDefined();
|
|
294
|
+
});
|
|
295
|
+
test(`1: Get ${gateway1.type} '${gateway1.id}'`, async () => {
|
|
296
|
+
const response = await AgentRaw.getAgentByTypeAndId(gateway1.type, gateway1.id);
|
|
297
|
+
expect(response).toMatchSnapshot();
|
|
298
|
+
});
|
|
299
|
+
test(`2: Get ${java1.type} '${java1.id}'`, async () => {
|
|
300
|
+
const response = await AgentRaw.getAgentByTypeAndId(java1.type, java1.id);
|
|
301
|
+
expect(response).toMatchSnapshot();
|
|
302
|
+
});
|
|
303
|
+
test(`3: Get ${web1.type} '${web1.id}'`, async () => {
|
|
304
|
+
const response = await AgentRaw.getAgentByTypeAndId(web1.type, web1.id);
|
|
305
|
+
expect(response).toMatchSnapshot();
|
|
231
306
|
});
|
|
232
|
-
expect.assertions(5);
|
|
233
|
-
const agent = await AgentRaw.deleteAgentByTypeAndId(agentType, agentId);
|
|
234
|
-
expect(agent).toBeTruthy();
|
|
235
|
-
expect(agent._id).toBe(agentId);
|
|
236
307
|
});
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
expect(
|
|
244
|
-
|
|
308
|
+
describe('putAgentByTypeAndId()', () => {
|
|
309
|
+
test('0: Method is implemented', async () => {
|
|
310
|
+
expect(AgentRaw.putAgentByTypeAndId).toBeDefined();
|
|
311
|
+
});
|
|
312
|
+
test(`1: Put ${gateway2.type} '${gateway2.id}'`, async () => {
|
|
313
|
+
const response = await AgentRaw.putAgentByTypeAndId(gateway2.type, gateway2.id, getAgent(gateway2.type, gateway2.id));
|
|
314
|
+
expect(response).toMatchSnapshot();
|
|
315
|
+
});
|
|
316
|
+
test(`2: Put ${java2.type} '${java2.id}'`, async () => {
|
|
317
|
+
const response = await AgentRaw.putAgentByTypeAndId(java2.type, java2.id, getAgent(java2.type, java2.id));
|
|
318
|
+
expect(response).toMatchSnapshot();
|
|
319
|
+
});
|
|
320
|
+
test(`3: Put ${web2.type} '${web2.id}'`, async () => {
|
|
321
|
+
const response = await AgentRaw.putAgentByTypeAndId(web2.type, web2.id, getAgent(web2.type, web2.id));
|
|
322
|
+
expect(response).toMatchSnapshot();
|
|
245
323
|
});
|
|
246
|
-
expect.assertions(5);
|
|
247
|
-
const agent = await AgentRaw.deleteAgentByTypeAndId(agentType, agentId);
|
|
248
|
-
expect(agent).toBeTruthy();
|
|
249
|
-
expect(agent._id).toBe(agentId);
|
|
250
324
|
});
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
expect(
|
|
258
|
-
|
|
325
|
+
describe('deleteAgentByTypeAndId()', () => {
|
|
326
|
+
test('0: Method is implemented', async () => {
|
|
327
|
+
expect(AgentRaw.deleteAgentByTypeAndId).toBeDefined();
|
|
328
|
+
});
|
|
329
|
+
test(`1: Delete ${gateway3.type} '${gateway3.id}'`, async () => {
|
|
330
|
+
const response = await AgentRaw.deleteAgentByTypeAndId(gateway3.type, gateway3.id);
|
|
331
|
+
expect(response).toMatchSnapshot();
|
|
332
|
+
});
|
|
333
|
+
test(`2: Delete ${java3.type} '${java3.id}'`, async () => {
|
|
334
|
+
const response = await AgentRaw.deleteAgentByTypeAndId(java3.type, java3.id);
|
|
335
|
+
expect(response).toMatchSnapshot();
|
|
336
|
+
});
|
|
337
|
+
test(`3: Delete ${web3.type} '${web3.id}'`, async () => {
|
|
338
|
+
const response = await AgentRaw.deleteAgentByTypeAndId(web3.type, web3.id);
|
|
339
|
+
expect(response).toMatchSnapshot();
|
|
259
340
|
});
|
|
260
|
-
expect.assertions(5);
|
|
261
|
-
const agent = await AgentRaw.deleteAgentByTypeAndId(agentType, agentId);
|
|
262
|
-
expect(agent).toBeTruthy();
|
|
263
|
-
expect(agent._id).toBe(agentId);
|
|
264
341
|
});
|
|
265
342
|
});
|
|
266
343
|
//# sourceMappingURL=AgentApi.test.js.map
|
package/esm/api/ApiTypes.mjs
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
export let ScriptLanguage;
|
|
2
2
|
(function (ScriptLanguage) {
|
|
3
|
-
ScriptLanguage["GROOVY"] = "GROOVY";
|
|
4
|
-
ScriptLanguage["JAVASCRIPT"] = "JAVASCRIPT";
|
|
3
|
+
ScriptLanguage[ScriptLanguage["GROOVY"] = 0] = "GROOVY";
|
|
4
|
+
ScriptLanguage[ScriptLanguage["JAVASCRIPT"] = 1] = "JAVASCRIPT";
|
|
5
5
|
})(ScriptLanguage || (ScriptLanguage = {}));
|
|
6
6
|
export let ScriptContext;
|
|
7
7
|
(function (ScriptContext) {
|
|
8
|
-
ScriptContext["OAUTH2_ACCESS_TOKEN_MODIFICATION"] = "OAUTH2_ACCESS_TOKEN_MODIFICATION";
|
|
9
|
-
ScriptContext["AUTHENTICATION_CLIENT_SIDE"] = "AUTHENTICATION_CLIENT_SIDE";
|
|
10
|
-
ScriptContext["AUTHENTICATION_TREE_DECISION_NODE"] = "AUTHENTICATION_TREE_DECISION_NODE";
|
|
11
|
-
ScriptContext["AUTHENTICATION_SERVER_SIDE"] = "AUTHENTICATION_SERVER_SIDE";
|
|
12
|
-
ScriptContext["SOCIAL_IDP_PROFILE_TRANSFORMATION"] = "SOCIAL_IDP_PROFILE_TRANSFORMATION";
|
|
13
|
-
ScriptContext["OAUTH2_VALIDATE_SCOPE"] = "OAUTH2_VALIDATE_SCOPE";
|
|
14
|
-
ScriptContext["CONFIG_PROVIDER_NODE"] = "CONFIG_PROVIDER_NODE";
|
|
15
|
-
ScriptContext["OAUTH2_AUTHORIZE_ENDPOINT_DATA_PROVIDER"] = "OAUTH2_AUTHORIZE_ENDPOINT_DATA_PROVIDER";
|
|
16
|
-
ScriptContext["OAUTH2_EVALUATE_SCOPE"] = "OAUTH2_EVALUATE_SCOPE";
|
|
17
|
-
ScriptContext["POLICY_CONDITION"] = "POLICY_CONDITION";
|
|
18
|
-
ScriptContext["OIDC_CLAIMS"] = "OIDC_CLAIMS";
|
|
19
|
-
ScriptContext["SAML2_IDP_ADAPTER"] = "SAML2_IDP_ADAPTER";
|
|
20
|
-
ScriptContext["SAML2_IDP_ATTRIBUTE_MAPPER"] = "SAML2_IDP_ATTRIBUTE_MAPPER";
|
|
21
|
-
ScriptContext["OAUTH2_MAY_ACT"] = "OAUTH2_MAY_ACT";
|
|
8
|
+
ScriptContext[ScriptContext["OAUTH2_ACCESS_TOKEN_MODIFICATION"] = 0] = "OAUTH2_ACCESS_TOKEN_MODIFICATION";
|
|
9
|
+
ScriptContext[ScriptContext["AUTHENTICATION_CLIENT_SIDE"] = 1] = "AUTHENTICATION_CLIENT_SIDE";
|
|
10
|
+
ScriptContext[ScriptContext["AUTHENTICATION_TREE_DECISION_NODE"] = 2] = "AUTHENTICATION_TREE_DECISION_NODE";
|
|
11
|
+
ScriptContext[ScriptContext["AUTHENTICATION_SERVER_SIDE"] = 3] = "AUTHENTICATION_SERVER_SIDE";
|
|
12
|
+
ScriptContext[ScriptContext["SOCIAL_IDP_PROFILE_TRANSFORMATION"] = 4] = "SOCIAL_IDP_PROFILE_TRANSFORMATION";
|
|
13
|
+
ScriptContext[ScriptContext["OAUTH2_VALIDATE_SCOPE"] = 5] = "OAUTH2_VALIDATE_SCOPE";
|
|
14
|
+
ScriptContext[ScriptContext["CONFIG_PROVIDER_NODE"] = 6] = "CONFIG_PROVIDER_NODE";
|
|
15
|
+
ScriptContext[ScriptContext["OAUTH2_AUTHORIZE_ENDPOINT_DATA_PROVIDER"] = 7] = "OAUTH2_AUTHORIZE_ENDPOINT_DATA_PROVIDER";
|
|
16
|
+
ScriptContext[ScriptContext["OAUTH2_EVALUATE_SCOPE"] = 8] = "OAUTH2_EVALUATE_SCOPE";
|
|
17
|
+
ScriptContext[ScriptContext["POLICY_CONDITION"] = 9] = "POLICY_CONDITION";
|
|
18
|
+
ScriptContext[ScriptContext["OIDC_CLAIMS"] = 10] = "OIDC_CLAIMS";
|
|
19
|
+
ScriptContext[ScriptContext["SAML2_IDP_ADAPTER"] = 11] = "SAML2_IDP_ADAPTER";
|
|
20
|
+
ScriptContext[ScriptContext["SAML2_IDP_ATTRIBUTE_MAPPER"] = 12] = "SAML2_IDP_ATTRIBUTE_MAPPER";
|
|
21
|
+
ScriptContext[ScriptContext["OAUTH2_MAY_ACT"] = 13] = "OAUTH2_MAY_ACT";
|
|
22
22
|
})(ScriptContext || (ScriptContext = {}));
|
|
23
23
|
export let Saml2ProiderLocation;
|
|
24
24
|
(function (Saml2ProiderLocation) {
|