Skip to content
This repository was archived by the owner on Dec 14, 2022. It is now read-only.

Commit 8ee07db

Browse files
author
Chris Wiechmann
committed
Integration tests fixed
1 parent 3cf68c2 commit 8ee07db

12 files changed

+33
-1
lines changed

apibuilder4elastic/test/trafficMonitorAPI/asAdmin/filetransfer/test_search_filetransfer_AsAdmin.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ describe('Endpoints', function () {
1616
// Simulate all responses in this test-file to be an admin, which will not lead to any result restriction
1717
nock('https://mocked-api-gateway:8090').get('/api/rbac/currentuser').reply(200, { "result": "david" });
1818
nock('https://mocked-api-gateway:8090').get('/api/rbac/permissions/currentuser').replyWithFile(200, './test/mockedReplies/apigateway/adminUserDavid.json');
19+
nock('https://mocked-api-gateway:8090').get('/api/topology').reply(200, { });
1920
});
2021

2122
afterEach(() => {

apibuilder4elastic/test/trafficMonitorAPI/asAdmin/http/test_search_count_AsAdmin.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ describe('Endpoints', function () {
1515
// Simulate all responses in this test-file to be an admin, which will not lead to any result restriction
1616
nock('https://mocked-api-gateway:8090').get('/api/rbac/currentuser').reply(200, { "result": "david" });
1717
nock('https://mocked-api-gateway:8090').get('/api/rbac/permissions/currentuser').replyWithFile(200, './test/mockedReplies/apigateway/adminUserDavid.json');
18+
nock('https://mocked-api-gateway:8090').get('/api/topology').reply(200, { });
1819
});
1920

2021
afterEach(() => {

apibuilder4elastic/test/trafficMonitorAPI/asAdmin/http/test_search_endpoint_AsAdmin.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ describe('Endpoints', function () {
1616
// Simulate all responses in this test-file to be an admin, which will not lead to any result restriction
1717
nock('https://mocked-api-gateway:8090').get('/api/rbac/currentuser').reply(200, { "result": "david" });
1818
nock('https://mocked-api-gateway:8090').get('/api/rbac/permissions/currentuser').replyWithFile(200, './test/mockedReplies/apigateway/adminUserDavid.json');
19+
nock('https://mocked-api-gateway:8090').get('/api/topology').reply(200, { });
1920
});
2021

2122
afterEach(() => {

apibuilder4elastic/test/trafficMonitorAPI/asAdmin/http/test_search_endpoint_regional.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ describe('Endpoints', function () {
1818
// Simulate all responses in this test-file to be an admin, which will not lead to any result restriction
1919
nock('https://mocked-api-gateway:8090').get('/api/rbac/currentuser').reply(200, { "result": "david" });
2020
nock('https://mocked-api-gateway:8090').get('/api/rbac/permissions/currentuser').replyWithFile(200, './test/mockedReplies/apigateway/adminUserDavid.json');
21+
nock('https://mocked-api-gateway:8090').get('/api/topology').reply(200, { });
2122
});
2223

2324
afterEach(() => {

apibuilder4elastic/test/trafficMonitorAPI/asAdmin/jms/test_search_jms_AsAdmin.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ describe('Endpoints', function () {
1919
// Which is translated into false by the Policy and the ANM implementation then takes care of the request
2020
nock('https://mocked-api-gateway:8090').get('/api/rbac/currentuser').reply(200, { "result": "david" });
2121
nock('https://mocked-api-gateway:8090').get('/api/rbac/permissions/currentuser').replyWithFile(200, './test/mockedReplies/apigateway/adminUserDavid.json');
22+
nock('https://mocked-api-gateway:8090').get('/api/topology').reply(200, { });
2223
});
2324

2425
afterEach(() => {

apibuilder4elastic/test/trafficMonitorAPI/asAdmin/websock/test_search_websock_AsAdmin.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ describe('Endpoints', function () {
1919
// Which is translated into false by the Policy --> The ANM implementation then takes care of the request
2020
nock('https://mocked-api-gateway:8090').get('/api/rbac/currentuser').reply(200, { "result": "david" });
2121
nock('https://mocked-api-gateway:8090').get('/api/rbac/permissions/currentuser').replyWithFile(200, './test/mockedReplies/apigateway/adminUserDavid.json');
22+
nock('https://mocked-api-gateway:8090').get('/api/topology').reply(200, { });
2223
});
2324

2425
afterEach(() => {

apibuilder4elastic/test/trafficMonitorAPI/restricted/filetransfer/test_search_filetransfer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ describe('Endpoints', function () {
1818
nock('https://mocked-api-gateway:8090').get('/api/rbac/permissions/currentuser').replyWithFile(200, './test/mockedReplies/apigateway/operatorChris.json');
1919
nock('https://mocked-api-gateway:8075').get(`/api/portal/v1.3/users?field=loginName&op=eq&value=chris&field=enabled&op=eq&value=enabled`).replyWithFile(200, './test/mockedReplies/apimanager/apiManagerUserChris.json');
2020
nock('https://mocked-api-gateway:8075').get(`/api/portal/v1.3/organizations/2bfaa1c2-49ab-4059-832d-CHRIS`).replyWithFile(200, './test/mockedReplies/apimanager/organizationChris.json');
21+
nock('https://mocked-api-gateway:8090').get('/api/topology').reply(200, { });
2122
});
2223

2324
afterEach(() => {

apibuilder4elastic/test/trafficMonitorAPI/restricted/http/test_getinfo_endpoint_restricted.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ describe('Endpoints', function () {
1111
let auth;
1212
const indexName = `apigw-traffic-details-getinfo_test_${getRandomInt(9999)}`;
1313

14+
beforeEach(() => {
15+
// Just return an empty topology as it's not required for the tests in this file
16+
nock('https://mocked-api-gateway:8090').get('/api/topology').reply(200, { });
17+
});
18+
1419
/**
1520
* Start API Builder.
1621
*/

apibuilder4elastic/test/trafficMonitorAPI/restricted/http/test_search_disabled_authz.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ describe('Endpoints', function () {
1111
let auth;
1212
const indexName = `apigw-traffic-summary-search_test_skipped_authz_${getRandomInt(9999)}`;
1313

14+
beforeEach(() => {
15+
// Just return an empty topology as it's not required for the tests in this file
16+
nock('https://mocked-api-gateway:8090').get('/api/topology').reply(200, { });
17+
});
18+
1419
/**
1520
* Start API Builder.
1621
*/

apibuilder4elastic/test/trafficMonitorAPI/restricted/http/test_search_extHttp1.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ describe('Endpoints', function () {
1111
let auth;
1212
const indexName = `apigw-traffic-summary-search_count_test_${getRandomInt(9999)}`;
1313

14+
beforeEach(() => {
15+
// Just return an empty topology as it's not required for the tests in this file
16+
nock('https://mocked-api-gateway:8090').get('/api/topology').reply(200, { });
17+
});
18+
1419
/**
1520
* Start API Builder.
1621
*/

0 commit comments

Comments
 (0)