Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Archive migration] 'x-pack/test/functional/es_archives/visualize/default' #128829

Merged
merged 6 commits into from
Apr 1, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions x-pack/test/api_integration/apis/lens/field_stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const COMMON_HEADERS = {

export default ({ getService }: FtrProviderContext) => {
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
const supertest = getService('supertest');

describe('index stats apis', () => {
Expand All @@ -29,10 +30,13 @@ export default ({ getService }: FtrProviderContext) => {

describe('field distribution', () => {
before(async () => {
await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/visualize/default');
await kibanaServer.savedObjects.cleanStandardList();
await kibanaServer.importExport.load(
'x-pack/test/functional/fixtures/kbn_archiver/visualize/default'
);
});
after(async () => {
await esArchiver.unload('x-pack/test/functional/es_archives/visualize/default');
await kibanaServer.savedObjects.cleanStandardList();
});

it('should return a 404 for missing index patterns', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,17 @@ export default ({ getService }: FtrProviderContext) => {
describe('existing_fields apis legacy', () => {
before(async () => {
await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional');
await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/visualize/default');
await kibanaServer.savedObjects.cleanStandardList();
await kibanaServer.importExport.load(
'x-pack/test/functional/fixtures/kbn_archiver/visualize/default'
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LeeDr when we discussed this previously, you mentioned that
this test should probably be in a separate PR, perhaps in the 8.0 branch,
to build the new archive, instead of 7.17.

await kibanaServer.uiSettings.update({
'lens:useFieldExistenceSampling': true,
});
});
after(async () => {
await esArchiver.unload('x-pack/test/functional/es_archives/logstash_functional');
await esArchiver.unload('x-pack/test/functional/es_archives/visualize/default');
await kibanaServer.savedObjects.cleanStandardList();
await kibanaServer.uiSettings.update({
'lens:useFieldExistenceSampling': false,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ 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 config = getService('config');
const PageObjects = getPageObjects([
Expand All @@ -30,7 +31,10 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {

describe('visualize feature controls security', () => {
before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/visualize/default');
await kibanaServer.savedObjects.cleanStandardList();
await kibanaServer.importExport.load(
'x-pack/test/functional/fixtures/kbn_archiver/visualize/default'
);
await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional');
// ensure we're logged out so we can login as the appropriate users
await PageObjects.security.forceLogout();
Expand All @@ -40,8 +44,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
// logout, so the other tests don't accidentally run as the custom users we're testing below
// NOTE: Logout needs to happen before anything else to avoid flaky behavior
await PageObjects.security.forceLogout();

await esArchiver.unload('x-pack/test/functional/es_archives/visualize/default');
await kibanaServer.savedObjects.cleanStandardList();
});

describe('global visualize all privileges', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { FtrProviderContext } from '../../../ftr_provider_context';

export default function ({ getPageObjects, getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
const config = getService('config');
const spacesService = getService('spaces');
const PageObjects = getPageObjects(['common', 'visualize', 'security', 'spaceSelector', 'error']);
Expand All @@ -26,7 +27,10 @@ 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/visualize/default');
await kibanaServer.savedObjects.cleanStandardList();
await kibanaServer.importExport.load(
'x-pack/test/functional/fixtures/kbn_archiver/visualize/default'
);
await spacesService.create({
id: 'custom_space',
name: 'custom_space',
Expand All @@ -36,7 +40,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {

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

it('shows visualize navlink', async () => {
Expand Down Expand Up @@ -67,7 +71,10 @@ 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/visualize/default');
await kibanaServer.savedObjects.cleanStandardList();
await kibanaServer.importExport.load(
'x-pack/test/functional/fixtures/kbn_archiver/visualize/default'
);
await spacesService.create({
id: 'custom_space',
name: 'custom_space',
Expand All @@ -77,7 +84,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {

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

it(`doesn't show visualize navlink`, async () => {
Expand Down
307 changes: 0 additions & 307 deletions x-pack/test/functional/es_archives/visualize/default/data.json

This file was deleted.

Loading