[Security Solution][EPM] Reenabling the ingest and endpoint tests (#79290)
* Reenabling the ingest and endpoint tests * Fixing list test and reenabling security functional tests
This commit is contained in:
parent
819ccf1247
commit
92ff5178c6
|
@ -6,21 +6,23 @@
|
|||
|
||||
import expect from '@kbn/expect';
|
||||
import { FtrProviderContext } from '../../../api_integration/ftr_provider_context';
|
||||
import { warnAndSkipTest } from '../../helpers';
|
||||
import { skipIfNoDockerRegistry } from '../../helpers';
|
||||
import { setupIngest } from '../fleet/agents/services';
|
||||
|
||||
export default function ({ getService }: FtrProviderContext) {
|
||||
const log = getService('log');
|
||||
export default function (providerContext: FtrProviderContext) {
|
||||
const { getService } = providerContext;
|
||||
const supertest = getService('supertest');
|
||||
const dockerServers = getService('dockerServers');
|
||||
|
||||
const server = dockerServers.get('registry');
|
||||
// use function () {} and not () => {} here
|
||||
// because `this` has to point to the Mocha context
|
||||
// see https://mochajs.org/#arrow-functions
|
||||
|
||||
describe('EPM - list', async function () {
|
||||
it('lists all packages from the registry', async function () {
|
||||
if (server.enabled) {
|
||||
skipIfNoDockerRegistry(providerContext);
|
||||
setupIngest(providerContext);
|
||||
|
||||
describe('list api tests', async () => {
|
||||
it('lists all packages from the registry', async function () {
|
||||
const fetchPackageList = async () => {
|
||||
const response = await supertest
|
||||
.get('/api/ingest_manager/epm/packages')
|
||||
|
@ -30,13 +32,9 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
};
|
||||
const listResponse = await fetchPackageList();
|
||||
expect(listResponse.response.length).not.to.be(0);
|
||||
} else {
|
||||
warnAndSkipTest(this, log);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it('lists all limited packages from the registry', async function () {
|
||||
if (server.enabled) {
|
||||
it('lists all limited packages from the registry', async function () {
|
||||
const fetchLimitedPackageList = async () => {
|
||||
const response = await supertest
|
||||
.get('/api/ingest_manager/epm/packages/limited')
|
||||
|
@ -46,9 +44,7 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
};
|
||||
const listResponse = await fetchLimitedPackageList();
|
||||
expect(listResponse.response).to.eql(['endpoint']);
|
||||
} else {
|
||||
warnAndSkipTest(this, log);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
export default function ({ loadTestFile }) {
|
||||
describe.skip('Ingest Manager Endpoints', function () {
|
||||
describe('Ingest Manager Endpoints', function () {
|
||||
this.tags('ciGroup7');
|
||||
// Ingest Manager setup
|
||||
loadTestFile(require.resolve('./setup'));
|
||||
|
|
|
@ -12,7 +12,7 @@ import { defineDockerServersConfig } from '@kbn/test';
|
|||
// Docker image to use for Ingest Manager API integration tests.
|
||||
// This hash comes from the commit hash here: https://github.com/elastic/package-storage/commit
|
||||
export const dockerImage =
|
||||
'docker.elastic.co/package-registry/distribution:518a65a993ab7e9c77b1d8d20cd6f847921d04ec';
|
||||
'docker.elastic.co/package-registry/distribution:a5132271ad37209d6978018bfe6e224546d719a8';
|
||||
|
||||
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
||||
const xPackAPITestsConfig = await readConfigFile(require.resolve('../api_integration/config.ts'));
|
||||
|
|
|
@ -13,7 +13,7 @@ import {
|
|||
export default function (providerContext: FtrProviderContext) {
|
||||
const { loadTestFile, getService } = providerContext;
|
||||
|
||||
describe.skip('endpoint', function () {
|
||||
describe('endpoint', function () {
|
||||
this.tags('ciGroup7');
|
||||
const ingestManager = getService('ingestManager');
|
||||
const log = getService('log');
|
||||
|
|
|
@ -10,7 +10,7 @@ import { getRegistryUrl as getRegistryUrlFromIngest } from '../../../plugins/ing
|
|||
export default function endpointAPIIntegrationTests(providerContext: FtrProviderContext) {
|
||||
const { loadTestFile, getService } = providerContext;
|
||||
|
||||
describe.skip('Endpoint plugin', function () {
|
||||
describe('Endpoint plugin', function () {
|
||||
const ingestManager = getService('ingestManager');
|
||||
|
||||
this.tags('ciGroup7');
|
||||
|
|
Loading…
Reference in a new issue