Skip to content

Commit

Permalink
[ftr tests] split x-pack functional_with_es_ssl config
Browse files Browse the repository at this point in the history
  • Loading branch information
dmlemeshko committed Feb 7, 2023
1 parent 8476ee1 commit 2fe0e9e
Showing 12 changed files with 81 additions and 18 deletions.
5 changes: 4 additions & 1 deletion .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ disabled:
- x-pack/test/functional_enterprise_search/base_config.ts
- x-pack/test/localization/config.base.ts
- test/server_integration/config.base.js
- x-pack/test/functional_with_es_ssl/config.base.ts

# QA suites that are run out-of-band
- x-pack/test/stack_functional_integration/configs/config.stack_functional_integration_base.js
@@ -180,7 +181,9 @@ enabled:
- x-pack/test/functional_embedded/config.ts
- x-pack/test/functional_enterprise_search/without_host_configured.config.ts
- x-pack/test/functional_execution_context/config.ts
- x-pack/test/functional_with_es_ssl/config.ts
- x-pack/test/functional_with_es_ssl/apps/cases/config.ts
- x-pack/test/functional_with_es_ssl/apps/discover_ml_uptime/config.ts
- x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/config.ts
- x-pack/test/functional/apps/advanced_settings/config.ts
- x-pack/test/functional/apps/aiops/config.ts
- x-pack/test/functional/apps/api_keys/config.ts
21 changes: 21 additions & 0 deletions x-pack/test/functional_with_es_ssl/apps/cases/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* 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';
import { resolve } from 'path';

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

return {
...baseConfig.getAll(),
testFiles: [resolve('.')],
junit: {
reportName: 'Chrome X-Pack UI Functional Tests with ES SSL - Cases',
},
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* 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';
import { resolve } from 'path';

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

return {
...baseConfig.getAll(),
testFiles: [
resolve(__dirname, './discover'),
resolve(__dirname, './uptime'),
resolve(__dirname, './ml'),
],
junit: {
reportName: 'Chrome X-Pack UI Functional Tests with ES SSL - Discover, Uptime, ML',
},
};
}
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import { FtrProviderContext } from '../../ftr_provider_context';
import { FtrProviderContext } from '../../../ftr_provider_context';

export default ({ loadTestFile, getService }: FtrProviderContext) => {
describe('Discover alerting', function () {
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@

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

export default function ({ getService, getPageObjects }: FtrProviderContext) {
const log = getService('log');
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@

import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import { DATAFEED_STATE } from '@kbn/ml-plugin/common/constants/states';
import { FtrProviderContext } from '../../ftr_provider_context';
import { FtrProviderContext } from '../../../ftr_provider_context';

function createTestJobAndDatafeed() {
const timestamp = Date.now();
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
* 2.0.
*/

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

export default ({ loadTestFile, getService }: FtrProviderContext) => {
const ml = getService('ml');
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@
import expect from '@kbn/expect';
import { setTimeout as setTimeoutAsync } from 'timers/promises';

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

export default ({ getPageObjects, getService }: FtrProviderContext) => {
describe('uptime alerts', () => {
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
* 2.0.
*/

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

const ARCHIVE = 'x-pack/test/functional/es_archives/uptime/full_heartbeat';

Original file line number Diff line number Diff line change
@@ -7,8 +7,8 @@

import expect from '@kbn/expect';
import { MonitorStatusTranslations } from '@kbn/synthetics-plugin/common/translations';
import { FtrProviderContext } from '../../ftr_provider_context';
import { deleteUptimeSettingsObject } from '../../../functional/apps/uptime';
import { FtrProviderContext } from '../../../ftr_provider_context';
import { deleteUptimeSettingsObject } from '../../../../functional/apps/uptime';

export default ({ getPageObjects, getService }: FtrProviderContext) => {
describe('uptime simple status alert', () => {
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* 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';
import { resolve } from 'path';

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

return {
...baseConfig.getAll(),
testFiles: [resolve('.')],
junit: {
reportName: 'Chrome X-Pack UI Functional Tests with ES SSL - Triggers Actions UI',
},
};
}
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
*/

import Fs from 'fs';
import { resolve, join } from 'path';
import { join } from 'path';
import { CA_CERT_PATH } from '@kbn/dev-utils';
import { FtrConfigProviderContext } from '@kbn/test';
import { pageObjects } from './page_objects';
@@ -51,14 +51,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
...xpackFunctionalConfig.getAll(),
servers,
pageObjects,
// list paths to the files that contain your plugins tests
testFiles: [
resolve(__dirname, './apps/triggers_actions_ui'),
resolve(__dirname, './apps/discover'),
resolve(__dirname, './apps/uptime'),
resolve(__dirname, './apps/ml'),
resolve(__dirname, './apps/cases'),
],
// Don't list paths to the files that contain your plugins tests here
apps: {
...xpackFunctionalConfig.get('apps'),
triggersActions: {

0 comments on commit 2fe0e9e

Please sign in to comment.