Skip to content

Commit b08f4c9

Browse files
Fixing list test and reenabling security functional tests
1 parent e306dd1 commit b08f4c9

File tree

2 files changed

+13
-17
lines changed
  • x-pack/test
    • ingest_manager_api_integration/apis/epm
    • security_solution_endpoint/apps/endpoint

2 files changed

+13
-17
lines changed

x-pack/test/ingest_manager_api_integration/apis/epm/list.ts

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,23 @@
66

77
import expect from '@kbn/expect';
88
import { FtrProviderContext } from '../../../api_integration/ftr_provider_context';
9-
import { warnAndSkipTest } from '../../helpers';
9+
import { skipIfNoDockerRegistry } from '../../helpers';
10+
import { setupIngest } from '../fleet/agents/services';
1011

11-
export default function ({ getService }: FtrProviderContext) {
12-
const log = getService('log');
12+
export default function (providerContext: FtrProviderContext) {
13+
const { getService } = providerContext;
1314
const supertest = getService('supertest');
14-
const dockerServers = getService('dockerServers');
1515

16-
const server = dockerServers.get('registry');
1716
// use function () {} and not () => {} here
1817
// because `this` has to point to the Mocha context
1918
// see https://mochajs.org/#arrow-functions
2019

2120
describe('EPM - list', async function () {
22-
it('lists all packages from the registry', async function () {
23-
if (server.enabled) {
21+
skipIfNoDockerRegistry(providerContext);
22+
setupIngest(providerContext);
23+
24+
describe('list api tests', async () => {
25+
it('lists all packages from the registry', async function () {
2426
const fetchPackageList = async () => {
2527
const response = await supertest
2628
.get('/api/ingest_manager/epm/packages')
@@ -30,13 +32,9 @@ export default function ({ getService }: FtrProviderContext) {
3032
};
3133
const listResponse = await fetchPackageList();
3234
expect(listResponse.response.length).not.to.be(0);
33-
} else {
34-
warnAndSkipTest(this, log);
35-
}
36-
});
35+
});
3736

38-
it('lists all limited packages from the registry', async function () {
39-
if (server.enabled) {
37+
it('lists all limited packages from the registry', async function () {
4038
const fetchLimitedPackageList = async () => {
4139
const response = await supertest
4240
.get('/api/ingest_manager/epm/packages/limited')
@@ -46,9 +44,7 @@ export default function ({ getService }: FtrProviderContext) {
4644
};
4745
const listResponse = await fetchLimitedPackageList();
4846
expect(listResponse.response).to.eql(['endpoint']);
49-
} else {
50-
warnAndSkipTest(this, log);
51-
}
47+
});
5248
});
5349
});
5450
}

x-pack/test/security_solution_endpoint/apps/endpoint/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
export default function (providerContext: FtrProviderContext) {
1414
const { loadTestFile, getService } = providerContext;
1515

16-
describe.skip('endpoint', function () {
16+
describe('endpoint', function () {
1717
this.tags('ciGroup7');
1818
const ingestManager = getService('ingestManager');
1919
const log = getService('log');

0 commit comments

Comments
 (0)