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

[ftr] split serverless config to speedup test run on CI #168195

Merged
merged 7 commits into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 6 additions & 0 deletions .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -412,16 +412,22 @@ enabled:
- x-pack/test_serverless/functional/test_suites/observability/config.examples.ts
- x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group1.ts
- x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group2.ts
- x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group3.ts
- x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group4.ts
- x-pack/test_serverless/functional/test_suites/observability/config.screenshots.ts
- x-pack/test_serverless/functional/test_suites/search/config.ts
- x-pack/test_serverless/functional/test_suites/search/config.examples.ts
- x-pack/test_serverless/functional/test_suites/search/config.screenshots.ts
- x-pack/test_serverless/functional/test_suites/search/common_configs/config.group1.ts
- x-pack/test_serverless/functional/test_suites/search/common_configs/config.group2.ts
- x-pack/test_serverless/functional/test_suites/search/common_configs/config.group3.ts
- x-pack/test_serverless/functional/test_suites/search/common_configs/config.group4.ts
- x-pack/test_serverless/functional/test_suites/security/config.ts
- x-pack/test_serverless/functional/test_suites/security/config.examples.ts
- x-pack/test_serverless/functional/test_suites/security/common_configs/config.group1.ts
- x-pack/test_serverless/functional/test_suites/security/common_configs/config.group2.ts
- x-pack/test_serverless/functional/test_suites/security/common_configs/config.group3.ts
- x-pack/test_serverless/functional/test_suites/security/common_configs/config.group4.ts
- x-pack/performance/journeys/ecommerce_dashboard.ts
- x-pack/performance/journeys/ecommerce_dashboard_map_only.ts
- x-pack/performance/journeys/flight_dashboard.ts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default ({ getService, loadTestFile, getPageObjects }: FtrProviderContext
const log = getService('log');
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
const PageObjects = getPageObjects(['timePicker']);
const PageObjects = getPageObjects(['timePicker', 'svlCommonPage']);
const config = getService('config');
let remoteEsArchiver;

Expand Down Expand Up @@ -53,19 +53,21 @@ export default ({ getService, loadTestFile, getPageObjects }: FtrProviderContext
}

await esNode.load(esArchive);
// changing the timepicker default here saves us from having to set it in Discover (~8s)
await PageObjects.timePicker.setDefaultAbsoluteRangeViaUiSettings();
await kibanaServer.uiSettings.update({
defaultIndex: indexPatternString,
'dateFormat:tz': 'UTC',
});
await kibanaServer.importExport.load(fixtureDirs.lensBasic);
await kibanaServer.importExport.load(fixtureDirs.lensDefault);
await PageObjects.svlCommonPage.login();
// changing the timepicker default here saves us from having to set it in Discover (~8s)
await PageObjects.timePicker.setDefaultAbsoluteRangeViaUiSettings();
});

after(async () => {
await esArchiver.unload(esArchive);
await PageObjects.timePicker.resetDefaultAbsoluteRangeViaUiSettings();
await PageObjects.svlCommonPage.forceLogout();
await kibanaServer.importExport.unload(fixtureDirs.lensBasic);
await kibanaServer.importExport.unload(fixtureDirs.lensDefault);
await kibanaServer.savedObjects.cleanStandardList();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@
* 2.0.
*/

import { FtrProviderContext } from '../../../ftr_provider_context';
import { FtrProviderContext } from '../../../../ftr_provider_context';

export default ({ loadTestFile, getPageObject }: FtrProviderContext) => {
const svlCommonPage = getPageObject('svlCommonPage');

describe('Visualizations', function () {
describe('Visualizations - Group 2', function () {
before(async () => {
await svlCommonPage.login();
});

loadTestFile(require.resolve('./group1'));
after(async () => {
await svlCommonPage.forceLogout();
});

loadTestFile(require.resolve('./open_in_lens/agg_based'));
loadTestFile(require.resolve('./open_in_lens/tsvb'));
});
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../../../ftr_provider_context';
import { FtrProviderContext } from '../../../../../../ftr_provider_context';

export default function ({ getPageObjects, getService }: FtrProviderContext) {
const { lens, timePicker, dashboard } = getPageObjects(['lens', 'timePicker', 'dashboard']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../../../ftr_provider_context';
import { FtrProviderContext } from '../../../../../../ftr_provider_context';

export default function ({ getPageObjects, getService }: FtrProviderContext) {
const { lens, timePicker, dashboard } = getPageObjects(['lens', 'timePicker', 'dashboard']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../../../ftr_provider_context';
import { FtrProviderContext } from '../../../../../../ftr_provider_context';

export default function ({ getPageObjects, getService }: FtrProviderContext) {
const { lens, timePicker, dashboard } = getPageObjects(['lens', 'timePicker', 'dashboard']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import { EsArchiver } from '@kbn/es-archiver';
import { FtrProviderContext } from '../../../../../ftr_provider_context';
import { FtrProviderContext } from '../../../../../../ftr_provider_context';

export default function ({ loadTestFile, getService, getPageObjects }: FtrProviderContext) {
const browser = getService('browser');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../../../ftr_provider_context';
import { FtrProviderContext } from '../../../../../../ftr_provider_context';

export default function ({ getPageObjects, getService }: FtrProviderContext) {
const { lens, timePicker, dashboard } = getPageObjects(['lens', 'timePicker', 'dashboard']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../../../ftr_provider_context';
import { FtrProviderContext } from '../../../../../../ftr_provider_context';

export default function ({ getPageObjects, getService }: FtrProviderContext) {
const { lens, timePicker, dashboard } = getPageObjects(['lens', 'timePicker', 'dashboard']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../../../ftr_provider_context';
import { FtrProviderContext } from '../../../../../../ftr_provider_context';

export default function ({ getPageObjects, getService }: FtrProviderContext) {
const { lens, timePicker, dashboard } = getPageObjects(['lens', 'timePicker', 'dashboard']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../../../ftr_provider_context';
import { FtrProviderContext } from '../../../../../../ftr_provider_context';

export default function ({ getPageObjects, getService }: FtrProviderContext) {
const { lens, timePicker, dashboard } = getPageObjects(['lens', 'timePicker', 'dashboard']);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { FtrProviderContext } from '../../../../ftr_provider_context';

export default ({ loadTestFile, getPageObject }: FtrProviderContext) => {
const svlCommonPage = getPageObject('svlCommonPage');

describe('Visualizations - Group 3', function () {
before(async () => {
await svlCommonPage.login();
});

after(async () => {
await svlCommonPage.forceLogout();
});

loadTestFile(require.resolve('./open_in_lens/tsvb'));
});
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../../../ftr_provider_context';
import { FtrProviderContext } from '../../../../../../ftr_provider_context';

export default function ({ getPageObjects, getService }: FtrProviderContext) {
const { lens, timePicker, dashboard, canvas } = getPageObjects([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../../../ftr_provider_context';
import { FtrProviderContext } from '../../../../../../ftr_provider_context';

export default function ({ getPageObjects, getService }: FtrProviderContext) {
const { lens, timePicker, dashboard } = getPageObjects(['lens', 'timePicker', 'dashboard']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import { EsArchiver } from '@kbn/es-archiver';
import { FtrProviderContext } from '../../../../../ftr_provider_context';
import { FtrProviderContext } from '../../../../../../ftr_provider_context';

export default function ({ loadTestFile, getService, getPageObjects }: FtrProviderContext) {
const browser = getService('browser');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../../../ftr_provider_context';
import { FtrProviderContext } from '../../../../../../ftr_provider_context';

export default function ({ getPageObjects, getService }: FtrProviderContext) {
const { lens, timePicker, dashboard } = getPageObjects(['lens', 'timePicker', 'dashboard']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/

import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../../../ftr_provider_context';
import { FtrProviderContext } from '../../../../../../ftr_provider_context';

export default function ({ getPageObjects, getService }: FtrProviderContext) {
const { lens, timePicker, dashboard } = getPageObjects(['lens', 'timePicker', 'dashboard']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../../../ftr_provider_context';
import { FtrProviderContext } from '../../../../../../ftr_provider_context';

export default function ({ getPageObjects, getService }: FtrProviderContext) {
const { lens, timePicker, dashboard } = getPageObjects(['lens', 'timePicker', 'dashboard']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../../../ftr_provider_context';
import { FtrProviderContext } from '../../../../../../ftr_provider_context';

export default function ({ getPageObjects, getService }: FtrProviderContext) {
const { lens, timePicker, dashboard } = getPageObjects(['lens', 'timePicker', 'dashboard']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {

return {
...baseTestConfig.getAll(),
testFiles: [require.resolve('../../common/visualizations')],
testFiles: [require.resolve('../../common/visualizations/group1')],
junit: {
reportName: 'Serverless Observability Functional Tests - Common Group 2',
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { FtrConfigProviderContext } from '@kbn/test';

export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const baseTestConfig = await readConfigFile(require.resolve('../config.ts'));

return {
...baseTestConfig.getAll(),
testFiles: [require.resolve('../../common/visualizations/group2')],
junit: {
reportName: 'Serverless Observability Functional Tests - Common Group 3',
},
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { FtrConfigProviderContext } from '@kbn/test';

export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const baseTestConfig = await readConfigFile(require.resolve('../config.ts'));

return {
...baseTestConfig.getAll(),
testFiles: [require.resolve('../../common/visualizations/group3')],
junit: {
reportName: 'Serverless Observability Functional Tests - Common Group 4',
},
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {

return {
...baseTestConfig.getAll(),
testFiles: [require.resolve('../../common/visualizations')],
testFiles: [require.resolve('../../common/visualizations/group1')],
junit: {
reportName: 'Serverless Search Functional Tests - Common Group 2',
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { FtrConfigProviderContext } from '@kbn/test';

export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const baseTestConfig = await readConfigFile(require.resolve('../config.ts'));

return {
...baseTestConfig.getAll(),
testFiles: [require.resolve('../../common/visualizations/group2')],
junit: {
reportName: 'Serverless Search Functional Tests - Common Group 2',
},
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { FtrConfigProviderContext } from '@kbn/test';

export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const baseTestConfig = await readConfigFile(require.resolve('../config.ts'));

return {
...baseTestConfig.getAll(),
testFiles: [require.resolve('../../common/visualizations/group3')],
junit: {
reportName: 'Serverless Search Functional Tests - Common Group 2',
},
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {

return {
...baseTestConfig.getAll(),
testFiles: [require.resolve('../../common/visualizations')],
testFiles: [require.resolve('../../common/visualizations/group1')],
junit: {
reportName: 'Serverless Security Functional Tests - Common Group 2',
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { FtrConfigProviderContext } from '@kbn/test';

export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const baseTestConfig = await readConfigFile(require.resolve('../config.ts'));

return {
...baseTestConfig.getAll(),
testFiles: [require.resolve('../../common/visualizations/group2')],
junit: {
reportName: 'Serverless Security Functional Tests - Common Group 3',
},
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { FtrConfigProviderContext } from '@kbn/test';

export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const baseTestConfig = await readConfigFile(require.resolve('../config.ts'));

return {
...baseTestConfig.getAll(),
testFiles: [require.resolve('../../common/visualizations/group3')],
junit: {
reportName: 'Serverless Security Functional Tests - Common Group 4',
},
};
}
Loading