Skip to content

Commit

Permalink
batch 1 of removing es_archives/empty_kibana (#138189)
Browse files Browse the repository at this point in the history
Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
Lee Drengenberg and kibanamachine authored Aug 12, 2022
1 parent c393b3d commit 6221b4f
Show file tree
Hide file tree
Showing 41 changed files with 110 additions and 101 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
const testSubjects = getService('testSubjects');
const appsMenu = getService('appsMenu');
const config = getService('config');
const kibanaServer = getService('kibanaServer');

describe('spaces feature controls', () => {
before(async () => {
Expand Down Expand Up @@ -62,7 +63,7 @@ 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/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();
await spacesService.create({
id: 'custom_space',
name: 'custom_space',
Expand All @@ -72,7 +73,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {

after(async () => {
await spacesService.delete('custom_space');
await esArchiver.unload('x-pack/test/functional/es_archives/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();
});

it(`redirects to management home`, async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../ftr_provider_context';

export default function ({ getPageObjects, getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
const security = getService('security');
const PageObjects = getPageObjects(['common', 'settings', 'security']);
const appsMenu = getService('appsMenu');
const managementMenu = getService('managementMenu');

describe('security', () => {
before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();
await PageObjects.common.navigateToApp('home');
});

after(async () => {
await esArchiver.unload('x-pack/test/functional/es_archives/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();
});

describe('global all privileges (aka kibana_admin)', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

after(async () => {
await esArchiver.unload('x-pack/test/functional/es_archives/getting_started/shakespeare');
await esArchiver.load('x-pack/test/functional/es_archives/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();
});

it('should be able to import dashboard with controls from 8.0.0', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

after(async () => {
await esArchiver.unload('x-pack/test/functional/es_archives/getting_started/shakespeare');
await esArchiver.load('x-pack/test/functional/es_archives/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();
});

it('should be able to import dashboard with various Lens panels from 7.12.1', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

after(async () => {
await esArchiver.unload('x-pack/test/functional/es_archives/logstash_functional');
await esArchiver.load('x-pack/test/functional/es_archives/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();
});
});

Expand Down Expand Up @@ -125,7 +125,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

after(async () => {
await esArchiver.unload('x-pack/test/functional/es_archives/logstash_functional');
await esArchiver.load('x-pack/test/functional/es_archives/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();
});
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

after(async () => {
await esArchiver.unload('x-pack/test/functional/es_archives/getting_started/shakespeare');
await esArchiver.load('x-pack/test/functional/es_archives/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();
});

it('should be able to import dashboard with various Visualize panels from 7.12.1', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {

describe('security', () => {
before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();
await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional');
});

after(async () => {
await esArchiver.unload('x-pack/test/functional/es_archives/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();
});

describe('global data views all privileges', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
const PageObjects = getPageObjects(['common', 'settings', 'security']);
const testSubjects = getService('testSubjects');
const appsMenu = getService('appsMenu');
const kibanaServer = getService('kibanaServer');

describe('spaces', () => {
before(async () => {
Expand All @@ -25,7 +26,7 @@ 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/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();

await spacesService.create({
id: 'custom_space',
Expand All @@ -36,7 +37,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {

after(async () => {
await spacesService.delete('custom_space');
await esArchiver.unload('x-pack/test/functional/es_archives/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();
});

it('shows Management navlink', async () => {
Expand All @@ -58,7 +59,7 @@ 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/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();
await spacesService.create({
id: 'custom_space',
name: 'custom_space',
Expand All @@ -68,7 +69,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {

after(async () => {
await spacesService.delete('custom_space');
await esArchiver.unload('x-pack/test/functional/es_archives/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();
});

it(`redirects to management home`, async () => {
Expand Down
3 changes: 2 additions & 1 deletion x-pack/test/functional/apps/data_views/spaces/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const spacesService = getService('spaces');
const esArchiver = getService('esArchiver');
const testSubjects = getService('testSubjects');
const kibanaServer = getService('kibanaServer');

describe('spaces', function () {
this.tags('skipFirefox');

before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();
await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional');
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../ftr_provider_context';

export default function ({ getPageObjects, getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
const security = getService('security');
const PageObjects = getPageObjects(['common', 'console', 'security', 'error']);
const appsMenu = getService('appsMenu');
Expand All @@ -19,7 +19,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {

describe('security', () => {
before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();

// ensure we're logged out so we can login as the appropriate users
await PageObjects.security.forceLogout();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../ftr_provider_context';

export default function ({ getPageObjects, getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
const spacesService = getService('spaces');
const PageObjects = getPageObjects(['common', 'dashboard', 'security', 'spaceSelector', 'error']);
const appsMenu = getService('appsMenu');
Expand All @@ -18,11 +18,11 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {

describe('spaces', () => {
before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();
});

after(async () => {
await esArchiver.unload('x-pack/test/functional/es_archives/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();
});

describe('space with no features disabled', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../ftr_provider_context';

export default function ({ getPageObjects, getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
const security = getService('security');
const PageObjects = getPageObjects(['common', 'graph', 'security', 'error']);
const testSubjects = getService('testSubjects');
Expand All @@ -18,7 +18,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {

describe('security', () => {
before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();
// ensure we're logged out so we can login as the appropriate users
await PageObjects.security.forceLogout();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../ftr_provider_context';

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

describe('spaces', () => {
before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();
});
describe('space with no features disabled', () => {
before(async () => {
Expand Down
2 changes: 1 addition & 1 deletion x-pack/test/functional/apps/graph/graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await browser.setWindowSize(1600, 1000);
log.debug('load graph/secrepo data');
await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/graph/secrepo');
await esArchiver.load('x-pack/test/functional/es_archives/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();
await PageObjects.common.navigateToApp('settings');
log.debug('create secrepo index pattern');
await PageObjects.settings.createIndexPattern('secrepo', '@timestamp');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../ftr_provider_context';

export default function ({ getPageObjects, getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
const security = getService('security');
const PageObjects = getPageObjects(['common', 'settings', 'security']);
const appsMenu = getService('appsMenu');
const managementMenu = getService('managementMenu');

describe('security', () => {
before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();
await PageObjects.common.navigateToApp('home');
});

after(async () => {
await esArchiver.unload('x-pack/test/functional/es_archives/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();
});

describe('global all privileges (aka kibana_admin)', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../ftr_provider_context';

export default function ({ getPageObjects, getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
const security = getService('security');
const PageObjects = getPageObjects(['common', 'settings', 'security']);
const appsMenu = getService('appsMenu');
const managementMenu = getService('managementMenu');

describe('security', () => {
before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();
await PageObjects.common.navigateToApp('home');
});

after(async () => {
await esArchiver.unload('x-pack/test/functional/es_archives/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();
});

describe('global all privileges (aka kibana_admin)', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../ftr_provider_context';

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

describe('infrastructure spaces', () => {
before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();
});

after(async () => {
await esArchiver.unload('x-pack/test/functional/es_archives/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();
});

describe('space with no features disabled', () => {
Expand Down Expand Up @@ -59,7 +59,7 @@ 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/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();
await spacesService.create({
id: 'custom_space',
name: 'custom_space',
Expand All @@ -69,7 +69,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {

after(async () => {
await spacesService.delete('custom_space');
await esArchiver.unload('x-pack/test/functional/es_archives/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();
});

it(`doesn't show infrastructure navlink`, async () => {
Expand Down Expand Up @@ -101,7 +101,7 @@ 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/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();
await spacesService.create({
id: 'custom_space',
name: 'custom_space',
Expand All @@ -111,7 +111,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {

after(async () => {
await spacesService.delete('custom_space');
await esArchiver.unload('x-pack/test/functional/es_archives/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();
});

it(`Infrastructure app is accessible`, async () => {
Expand All @@ -126,7 +126,7 @@ 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/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();
await spacesService.create({
id: 'custom_space',
name: 'custom_space',
Expand All @@ -136,7 +136,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {

after(async () => {
await spacesService.delete('custom_space');
await esArchiver.unload('x-pack/test/functional/es_archives/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();
});

it(`Infrastructure app is accessible`, async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../ftr_provider_context';

export default function ({ getPageObjects, getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
const security = getService('security');
const PageObjects = getPageObjects(['common', 'error', 'infraHome', 'security']);
const testSubjects = getService('testSubjects');
Expand All @@ -18,7 +18,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {

describe('logs security', () => {
before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/empty_kibana');
await kibanaServer.savedObjects.cleanStandardList();
});
describe('global logs all privileges', () => {
before(async () => {
Expand Down
Loading

0 comments on commit 6221b4f

Please sign in to comment.