Skip to content

Commit

Permalink
changes to how we load/unload data
Browse files Browse the repository at this point in the history
  • Loading branch information
rashmivkulkarni committed Nov 19, 2020
1 parent b3fd1e2 commit b6b1a2d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../ftr_provider_context';

export default function ({ getPageObjects, getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const security = getService('security');
const PageObjects = getPageObjects(['common', 'error', 'maps', 'settings', 'security']);
const appsMenu = getService('appsMenu');
Expand All @@ -17,11 +16,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
const savedQueryManagementComponent = getService('savedQueryManagementComponent');

describe('maps security feature controls', () => {
before(async () => {
await esArchiver.loadIfNeeded('maps/data');
await esArchiver.load('maps/kibana');
});

after(async () => {
// logout, so the other tests don't accidentally run as the custom users we're testing below
await PageObjects.security.forceLogout();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,18 @@ import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../ftr_provider_context';

export default function ({ getPageObjects, getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const spacesService = getService('spaces');
const PageObjects = getPageObjects(['common', 'maps', 'security']);
const appsMenu = getService('appsMenu');

// FLAKY: https://github.com/elastic/kibana/issues/38414
describe.skip('spaces feature controls', () => {
before(async () => {
await esArchiver.loadIfNeeded('maps/data');
await esArchiver.load('maps/kibana');
PageObjects.maps.setBasePath('/s/custom_space');
});

after(async () => {
await esArchiver.unload('maps/kibana');
await PageObjects.security.forceLogout();
PageObjects.maps.setBasePath('');
});

Expand Down
4 changes: 4 additions & 0 deletions x-pack/test/functional/apps/maps/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ export default function ({ loadTestFile, getService }) {
before(async () => {
await esArchiver.loadIfNeeded('logstash_functional');
await esArchiver.load('maps/data');
});

// The data in the before() doesn't get changed inside the test, but the kibana index starting point should be the same for each individual test
beforeEach(async () => {
await esArchiver.load('maps/kibana');
await kibanaServer.uiSettings.replace({
defaultIndex: 'c698b940-e149-11e8-a35a-370a8516603a',
Expand Down

0 comments on commit b6b1a2d

Please sign in to comment.