From 59ece7992b29597b83f2acc78268c51fc1675de5 Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Thu, 2 Jul 2020 08:24:42 -0700 Subject: [PATCH] Make Index Management functional and API integration tests robust against side effects introduced by Ingest Manager. (#70533) --- .../apis/management/index_management/templates.js | 8 ++++---- .../test/functional/apps/index_management/home_page.ts | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/x-pack/test/api_integration/apis/management/index_management/templates.js b/x-pack/test/api_integration/apis/management/index_management/templates.js index 003fb21b09ccc..fcee8ed6a183f 100644 --- a/x-pack/test/api_integration/apis/management/index_management/templates.js +++ b/x-pack/test/api_integration/apis/management/index_management/templates.js @@ -24,8 +24,7 @@ export default function ({ getService }) { updateTemplate, } = registerHelpers({ supertest }); - // blocking es snapshot promotion: https://github.com/elastic/kibana/issues/70532 - describe.skip('index templates', () => { + describe('index templates', () => { after(() => Promise.all([cleanUpEsResources()])); describe('get all', () => { @@ -41,8 +40,9 @@ export default function ({ getService }) { it('should list all the index templates with the expected parameters', async () => { const { body: allTemplates } = await getAllTemplates().expect(200); - // Composable templates - expect(allTemplates.templates).to.eql([]); + // Composable index templates may have been created by other apps, e.g. Ingest Manager, + // so we don't make any assertion about these contents. + expect(allTemplates.templates).to.be.an('array'); // Legacy templates const legacyTemplate = allTemplates.legacyTemplates.find( diff --git a/x-pack/test/functional/apps/index_management/home_page.ts b/x-pack/test/functional/apps/index_management/home_page.ts index b5b0197aad4b3..eab90e1fc19cf 100644 --- a/x-pack/test/functional/apps/index_management/home_page.ts +++ b/x-pack/test/functional/apps/index_management/home_page.ts @@ -13,8 +13,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const log = getService('log'); const browser = getService('browser'); - // blocking es snapshot promotion: https://github.com/elastic/kibana/issues/70532 - describe.skip('Home page', function () { + describe('Home page', function () { before(async () => { await pageObjects.common.navigateToApp('indexManagement'); }); @@ -82,9 +81,10 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const url = await browser.getCurrentUrl(); expect(url).to.contain(`/component_templates`); - // There should be no component templates by default, so we verify the empty prompt displays - const componentTemplateEmptyPrompt = await testSubjects.exists('emptyList'); - expect(componentTemplateEmptyPrompt).to.be(true); + // Verify content. Component templates may have been created by other apps, e.g. Ingest Manager, + // so we don't make any assertion about the presence or absence of component templates. + const componentTemplateList = await testSubjects.exists('componentTemplateList'); + expect(componentTemplateList).to.be(true); }); }); });