Skip to content

Commit

Permalink
Fix test/functional/apps/management/_index_patterns_empty.ts for Clou…
Browse files Browse the repository at this point in the history
…d & X-Pack (#82736)

Co-authored-by: Rashmi Kulkarni <rashmi.kulkarni@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
3 people committed Nov 10, 2020
1 parent e9c1b01 commit 29eed87
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions test/functional/apps/management/_index_patterns_empty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { FtrProviderContext } from '../../ftr_provider_context';
export default function ({ getPageObjects, getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
const log = getService('log');
const PageObjects = getPageObjects(['common', 'settings']);
const testSubjects = getService('testSubjects');
const globalNav = getService('globalNav');
Expand All @@ -30,23 +31,35 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
describe('index pattern empty view', () => {
before(async () => {
await esArchiver.load('empty_kibana');
await esArchiver.unload('logstash_functional');
await esArchiver.unload('makelogs');
await kibanaServer.uiSettings.replace({});
await PageObjects.settings.navigateTo();
});

after(async () => {
await esArchiver.unload('empty_kibana');
await esArchiver.loadIfNeeded('makelogs');
});

// create index pattern and return to verify list
it(`shows empty views`, async () => {
// @ts-expect-error
await es.transport.request({
path: '/_all',
path: '/logstash-a',
method: 'DELETE',
});
});

// create index pattern and return to verify list
it(`shows empty views`, async () => {
await PageObjects.settings.clickKibanaIndexPatterns();
log.debug(
`\n\nNOTE: If this test fails make sure there aren't any non-system indices in the _cat/indices output (use esArchiver.unload on them)`
);
log.debug(
// @ts-expect-error
await es.transport.request({
path: '/_cat/indices',
method: 'GET',
})
);
await testSubjects.existOrFail('createAnyway');
// @ts-expect-error
await es.transport.request({
Expand Down

0 comments on commit 29eed87

Please sign in to comment.