[Archive Migrations] don't use es_archiver/empty_kibana in Shakespeare tests (#137797) (#138176)

* don't use es_archiver/empty_kibana, speed up steps

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* revert change to listing page

* revert this change and do in another PR

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 148381bd19)

Co-authored-by: Lee Drengenberg <lee.drengenberg@elastic.co>
This commit is contained in:
Kibana Machine 2022-08-04 18:26:57 -04:00 committed by GitHub
parent 01a6122a3b
commit 800fea9292
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,15 +42,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
let isNewChartsLibraryEnabled = true;
before(async function () {
log.debug(
'Load empty_kibana and Shakespeare Getting Started data\n' +
'https://www.elastic.co/guide/en/kibana/current/tutorial-load-dataset.html'
);
log.debug('https://www.elastic.co/guide/en/kibana/current/tutorial-load-dataset.html');
isNewChartsLibraryEnabled = await PageObjects.visChart.isNewChartsLibraryEnabled();
await security.testUser.setRoles(['kibana_admin', 'test_shakespeare_reader']);
await esArchiver.load('test/functional/fixtures/es_archiver/empty_kibana', {
skipExisting: true,
});
await kibanaServer.savedObjects.cleanStandardList();
log.debug('Load shakespeare data');
await esArchiver.loadIfNeeded(
'test/functional/fixtures/es_archiver/getting_started/shakespeare'
@ -67,6 +62,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
after(async () => {
await security.testUser.restoreDefaults();
await esArchiver.unload('test/functional/fixtures/es_archiver/getting_started/shakespeare');
kibanaServer.savedObjects.cleanStandardList();
await kibanaServer.uiSettings.replace({});
});