Skip to content

Commit

Permalink
Make Index Management functional and API integration tests robust aga…
Browse files Browse the repository at this point in the history
…inst side effects introduced by Ingest Manager. (#70533)
  • Loading branch information
cjcenizal authored Jul 2, 2020
1 parent 3c56371 commit 59ece79
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand 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(
Expand Down
10 changes: 5 additions & 5 deletions x-pack/test/functional/apps/index_management/home_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});
Expand Down Expand Up @@ -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);
});
});
});
Expand Down

0 comments on commit 59ece79

Please sign in to comment.