From 5a890dc5619649a19e25ce334ae519b3e0378d77 Mon Sep 17 00:00:00 2001 From: Tre' Seymour Date: Mon, 30 Aug 2021 10:43:00 +0100 Subject: [PATCH] [Archive Migration][Partial] discover remaining Comes from https://github.com/elastic/kibana/pull/102827 Helps with https://github.com/elastic/kibana/pull/108503 Piggy back off of the work from @tylersmalley Only include the changes under the test/plugin_functional/test_suites/doc_views & test/visual_regression/tests/discover folders. --- test/plugin_functional/test_suites/doc_views/index.ts | 8 ++++++-- .../tests/discover/chart_visualization.ts | 7 ++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/test/plugin_functional/test_suites/doc_views/index.ts b/test/plugin_functional/test_suites/doc_views/index.ts index a790f062e32d4..5b055cf1e5ecc 100644 --- a/test/plugin_functional/test_suites/doc_views/index.ts +++ b/test/plugin_functional/test_suites/doc_views/index.ts @@ -9,12 +9,16 @@ import { PluginFunctionalProviderContext } from '../../services'; export default function ({ getService, loadTestFile }: PluginFunctionalProviderContext) { - const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); // SKIPPED: https://github.com/elastic/kibana/issues/100060 describe.skip('doc views', function () { before(async () => { - await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/discover'); + await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover.json'); + }); + + after(async () => { + await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover.json'); }); loadTestFile(require.resolve('./doc_views')); diff --git a/test/visual_regression/tests/discover/chart_visualization.ts b/test/visual_regression/tests/discover/chart_visualization.ts index 389a0a4b6a314..ef516a6fec3b6 100644 --- a/test/visual_regression/tests/discover/chart_visualization.ts +++ b/test/visual_regression/tests/discover/chart_visualization.ts @@ -24,7 +24,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('discover', function describeIndexTests() { before(async function () { - await esArchiver.load('test/functional/fixtures/es_archiver/discover'); + await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover.json'); // and load a set of makelogs data await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); @@ -33,8 +33,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.timePicker.setDefaultAbsoluteRange(); }); - after(function unloadMakelogs() { - return esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional'); + after(async () => { + await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover.json'); + await esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional'); }); async function refreshDiscover() {