From 456b68a80e95daab96e91f25b25cdff15bf375be Mon Sep 17 00:00:00 2001 From: neptunian Date: Tue, 27 Oct 2020 13:06:00 -0400 Subject: [PATCH] check for server enabled --- .../ingest_manager_api_integration/apis/epm/data_stream.ts | 2 +- .../apis/epm/package_install_complete.ts | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/x-pack/test/ingest_manager_api_integration/apis/epm/data_stream.ts b/x-pack/test/ingest_manager_api_integration/apis/epm/data_stream.ts index d1d909f773a2b..3dbfdfb45008f 100644 --- a/x-pack/test/ingest_manager_api_integration/apis/epm/data_stream.ts +++ b/x-pack/test/ingest_manager_api_integration/apis/epm/data_stream.ts @@ -65,7 +65,7 @@ export default function (providerContext: FtrProviderContext) { }); }); afterEach(async () => { - if (!server) return; + if (!server.enabled) return; await es.transport.request({ method: 'DELETE', path: `/_data_stream/${logsTemplateName}-default`, diff --git a/x-pack/test/ingest_manager_api_integration/apis/epm/package_install_complete.ts b/x-pack/test/ingest_manager_api_integration/apis/epm/package_install_complete.ts index 6fd4b64f0ee5e..2e7ab199a7fbc 100644 --- a/x-pack/test/ingest_manager_api_integration/apis/epm/package_install_complete.ts +++ b/x-pack/test/ingest_manager_api_integration/apis/epm/package_install_complete.ts @@ -16,6 +16,8 @@ export default function (providerContext: FtrProviderContext) { const { getService } = providerContext; const supertest = getService('supertest'); const kibanaServer = getService('kibanaServer'); + const dockerServers = getService('dockerServers'); + const server = dockerServers.get('registry'); const pkgName = 'multiple_versions'; const pkgVersion = '0.1.0'; const pkgUpdateVersion = '0.2.0'; @@ -23,6 +25,7 @@ export default function (providerContext: FtrProviderContext) { skipIfNoDockerRegistry(providerContext); describe('package install', async () => { before(async () => { + if (!server.enabled) return; await supertest .post(`/api/fleet/epm/packages/${pkgName}-0.1.0`) .set('kbn-xsrf', 'xxxx') @@ -84,6 +87,7 @@ export default function (providerContext: FtrProviderContext) { expect(packageAfterSetup.attributes.install_status).equal('installing'); }); after(async () => { + if (!server.enabled) return; await supertest .delete(`/api/fleet/epm/packages/multiple_versions-0.1.0`) .set('kbn-xsrf', 'xxxx') @@ -92,6 +96,7 @@ export default function (providerContext: FtrProviderContext) { }); describe('package update', async () => { before(async () => { + if (!server.enabled) return; await supertest .post(`/api/fleet/epm/packages/${pkgName}-0.1.0`) .set('kbn-xsrf', 'xxxx') @@ -164,6 +169,7 @@ export default function (providerContext: FtrProviderContext) { expect(packageAfterSetup.attributes.version).equal(pkgVersion); }); after(async () => { + if (!server.enabled) return; await supertest .delete(`/api/fleet/epm/packages/multiple_versions-0.1.0`) .set('kbn-xsrf', 'xxxx')