Skip to content

Commit

Permalink
[Archive Migration] x-pack..discover/feature_controls/spaces (#107644)
Browse files Browse the repository at this point in the history
  • Loading branch information
wayneseymour committed Aug 10, 2021
1 parent aba804c commit 6579c6c
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 547 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
]);
const testSubjects = getService('testSubjects');
const appsMenu = getService('appsMenu');
const kibanaServer = getService('kibanaServer');

async function setDiscoverTimeRange() {
await PageObjects.timePicker.setDefaultAbsoluteRange();
Expand All @@ -36,8 +37,12 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
before(async () => {
// we need to load the following in every situation as deleting
// a space deletes all of the associated saved objects
await esArchiver.load(
'x-pack/test/functional/es_archives/discover/feature_controls/spaces'
await kibanaServer.importExport.load(
'x-pack/test/functional/fixtures/kbn_archiver/discover/feature_controls/spaces'
);
await kibanaServer.importExport.load(
'x-pack/test/functional/fixtures/kbn_archiver/discover/feature_controls/custom_space',
{ space: 'custom_space' }
);
await spacesService.create({
id: 'custom_space',
Expand All @@ -48,8 +53,12 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {

after(async () => {
await spacesService.delete('custom_space');
await esArchiver.unload(
'x-pack/test/functional/es_archives/discover/feature_controls/spaces'
await kibanaServer.importExport.unload(
'x-pack/test/functional/fixtures/kbn_archiver/discover/feature_controls/custom_space',
{ space: 'custom_space' }
);
await kibanaServer.importExport.unload(
'x-pack/test/functional/fixtures/kbn_archiver/discover/feature_controls/spaces'
);
});

Expand Down Expand Up @@ -84,8 +93,8 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
before(async () => {
// we need to load the following in every situation as deleting
// a space deletes all of the associated saved objects
await esArchiver.load(
'x-pack/test/functional/es_archives/discover/feature_controls/spaces'
await kibanaServer.importExport.load(
'x-pack/test/functional/fixtures/kbn_archiver/discover/feature_controls/spaces'
);
await spacesService.create({
id: 'custom_space',
Expand All @@ -96,8 +105,8 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {

after(async () => {
await spacesService.delete('custom_space');
await esArchiver.unload(
'x-pack/test/functional/es_archives/discover/feature_controls/spaces'
await kibanaServer.importExport.unload(
'x-pack/test/functional/fixtures/kbn_archiver/discover/feature_controls/spaces'
);
});

Expand Down

This file was deleted.

Loading

0 comments on commit 6579c6c

Please sign in to comment.