Skip to content

Commit

Permalink
delete all indices to enforce no data (#134646)
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 authored Jun 20, 2022
1 parent 01b8482 commit 220126e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion x-pack/test/functional/apps/lens/group3/no_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const retry = getService('retry');
const find = getService('find');
const esArchiver = getService('esArchiver');
const es = getService('es');
const kibanaServer = getService('kibanaServer');
const testSubjects = getService('testSubjects');
const PageObjects = getPageObjects(['common', 'lens', 'header', 'timePicker']);
Expand All @@ -25,7 +26,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

describe('lens no data', () => {
before(async function () {
await esArchiver.unload('x-pack/test/functional/es_archives/logstash_functional');
// delete all non-hidden indices to make it really "no data"
const indices = Object.keys(await es.indices.get({ index: '*' }));
await Promise.all(indices.map(async (index) => await es.indices.delete({ index })));
await kibanaServer.savedObjects.clean({ types: ['index-pattern'] });
await PageObjects.common.navigateToApp('lens');
});
Expand Down

0 comments on commit 220126e

Please sign in to comment.