Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Index Management functional and API integration tests robust against side effects introduced by Ingest Manager. #70533

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If no components are created automatically then this test would fail, right? I am not sure that we need this test, as this use case is covered by our component integration tests (mocked empty list = empty prompt, results = template list).

expect(componentTemplateList).to.be(true);
});
});
});
Expand Down