mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[ftr] load the minimum required scope of services in serverless (#165887)
## Summary We try to reuse existing FTR services for serverless test as much as possible. Most of the services are deployment agnostic, however some won't work on serverless and we add its own serverless implementation. Currently we import all the services from api integration tests directly into the serverless services. The same with functional ones. This PR loads the minimum required services for api integration and functional tests respectively. This way we can control which services are deployment agnostic and explicitly remove any of it when we decide to have its own implementation for serverless.
This commit is contained in:
parent
7e25900bc5
commit
a31cc1fee0
5 changed files with 123 additions and 8 deletions
1
.github/CODEOWNERS
vendored
1
.github/CODEOWNERS
vendored
|
@ -1041,6 +1041,7 @@ x-pack/plugins/infra/server/lib/alerting @elastic/actionable-observability
|
|||
/packages/kbn-test/src/functional_test_runner @elastic/appex-qa
|
||||
/packages/kbn-performance-testing-dataset-extractor @elastic/appex-qa
|
||||
/x-pack/test_serverless/**/*config.base.ts @elastic/appex-qa
|
||||
/x-pack/test_serverless/**/deployment_agnostic_services.ts @elastic/appex-qa
|
||||
|
||||
# Core
|
||||
/config/ @elastic/kibana-core
|
||||
|
|
|
@ -6,8 +6,7 @@
|
|||
*/
|
||||
|
||||
import { GenericFtrProviderContext } from '@kbn/test';
|
||||
// eslint-disable-next-line @kbn/imports/no_boundary_crossing
|
||||
import { services as xpackApiIntegrationServices } from '../../../test/api_integration/services';
|
||||
import { services as deploymentAgnosticSharedServices } from '../../shared/services/deployment_agnostic_services';
|
||||
import { services as svlSharedServices } from '../../shared/services';
|
||||
|
||||
import { AlertingApiProvider } from './alerting_api';
|
||||
|
@ -16,9 +15,11 @@ import { DataViewApiProvider } from './data_view_api';
|
|||
import { SvlCasesServiceProvider } from './svl_cases';
|
||||
|
||||
export const services = {
|
||||
...xpackApiIntegrationServices,
|
||||
...svlSharedServices,
|
||||
// deployment agnostic FTR services
|
||||
...deploymentAgnosticSharedServices,
|
||||
|
||||
// serverless FTR services
|
||||
...svlSharedServices,
|
||||
alertingApi: AlertingApiProvider,
|
||||
samlTools: SamlToolsProvider,
|
||||
dataViewApi: DataViewApiProvider,
|
||||
|
|
|
@ -0,0 +1,77 @@
|
|||
/*
|
||||
* 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 _ from 'lodash';
|
||||
// eslint-disable-next-line @kbn/imports/no_boundary_crossing
|
||||
import { services as functionalServices } from '../../../test/functional/services';
|
||||
import { services as deploymentAgnosticSharedServices } from '../../shared/services/deployment_agnostic_services';
|
||||
|
||||
/*
|
||||
* Some FTR services from stateful functional tests are compatible with serverless environment
|
||||
* While adding a new one, make sure to verify that it works on both Kibana CI and MKI
|
||||
*/
|
||||
const deploymentAgnosticFunctionalServices = _.pick(functionalServices, [
|
||||
'__webdriver__',
|
||||
'aceEditor',
|
||||
'actions',
|
||||
'appsMenu',
|
||||
'browser',
|
||||
'canvasElement',
|
||||
'cases',
|
||||
'comboBox',
|
||||
'dashboardAddPanel',
|
||||
'dashboardBadgeActions',
|
||||
'dashboardCustomizePanel',
|
||||
'dashboardDrilldownPanelActions',
|
||||
'dashboardDrilldownsManage',
|
||||
'dashboardExpect',
|
||||
'dashboardPanelActions',
|
||||
'dashboardReplacePanel',
|
||||
'dashboardSettings',
|
||||
'dashboardVisualizations',
|
||||
'dataGrid',
|
||||
'docTable',
|
||||
'elasticChart',
|
||||
'embedding',
|
||||
'failureDebugging',
|
||||
'fieldEditor',
|
||||
'filterBar',
|
||||
'find',
|
||||
'flyout',
|
||||
'globalNav',
|
||||
'inspector',
|
||||
'listingTable',
|
||||
'managementMenu',
|
||||
'menuToggle',
|
||||
'monacoEditor',
|
||||
'pieChart',
|
||||
'pipelineEditor',
|
||||
'pipelineList',
|
||||
'png',
|
||||
'queryBar',
|
||||
'random',
|
||||
'renderable',
|
||||
'retryOnStale',
|
||||
'rules',
|
||||
'sampleData',
|
||||
'savedObjectsFinder',
|
||||
'savedQueryManagementComponent',
|
||||
'screenshots',
|
||||
'snapshots',
|
||||
'supertest',
|
||||
'testSubjects',
|
||||
'toasts',
|
||||
'uptime',
|
||||
'usageCollection',
|
||||
'userMenu',
|
||||
'vegaDebugInspector',
|
||||
]);
|
||||
|
||||
export const services = {
|
||||
...deploymentAgnosticSharedServices,
|
||||
...deploymentAgnosticFunctionalServices,
|
||||
};
|
|
@ -5,8 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
// eslint-disable-next-line @kbn/imports/no_boundary_crossing
|
||||
import { services as xpackFunctionalServices } from '../../../test/functional/services';
|
||||
import { services as deploymentAgnosticFunctionalServices } from './deployment_agnostic_services';
|
||||
import { services as svlSharedServices } from '../../shared/services';
|
||||
|
||||
import { SvlCommonNavigationServiceProvider } from './svl_common_navigation';
|
||||
|
@ -16,9 +15,11 @@ import { SvlSecNavigationServiceProvider } from './svl_sec_navigation';
|
|||
import { SvlCommonScreenshotsProvider } from './svl_common_screenshots';
|
||||
|
||||
export const services = {
|
||||
...xpackFunctionalServices,
|
||||
...svlSharedServices,
|
||||
// deployment agnostic FTR services
|
||||
...deploymentAgnosticFunctionalServices,
|
||||
|
||||
// serverless FTR services
|
||||
...svlSharedServices,
|
||||
svlCommonNavigation: SvlCommonNavigationServiceProvider,
|
||||
svlObltNavigation: SvlObltNavigationServiceProvider,
|
||||
svlSearchNavigation: SvlSearchNavigationServiceProvider,
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* 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 _ from 'lodash';
|
||||
// eslint-disable-next-line @kbn/imports/no_boundary_crossing
|
||||
import { services as apiIntegrationServices } from '../../../test/api_integration/services';
|
||||
|
||||
/*
|
||||
* Some FTR services from api integration stateful tests are compatible with serverless environment
|
||||
* While adding a new one, make sure to verify that it works on both Kibana CI and MKI
|
||||
*/
|
||||
const deploymentAgnosticApiIntegrationServices = _.pick(apiIntegrationServices, [
|
||||
'deployment',
|
||||
'es',
|
||||
'esArchiver',
|
||||
'esDeleteAllIndices',
|
||||
'esSupertest',
|
||||
'indexPatterns',
|
||||
'ingestPipelines',
|
||||
'kibanaServer',
|
||||
'ml',
|
||||
'randomness',
|
||||
'retry',
|
||||
'security',
|
||||
'usageAPI',
|
||||
]);
|
||||
|
||||
export const services = {
|
||||
// deployment agnostic FTR services
|
||||
...deploymentAgnosticApiIntegrationServices,
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue