Skip to content

Commit

Permalink
[ftr] split serverless config to speedup test run on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
dmlemeshko committed Oct 6, 2023
1 parent c828ff4 commit b0c2220
Show file tree
Hide file tree
Showing 27 changed files with 166 additions and 22 deletions.
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 @@ -5,18 +5,16 @@
* 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'));
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,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 { FtrProviderContext } from '../../../../ftr_provider_context';

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

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

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',
},
};
}

0 comments on commit b0c2220

Please sign in to comment.