From 86cbc85e621f4f3f701ed230f4e859ac5a80145b Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Wed, 11 Dec 2024 12:07:38 +0100 Subject: [PATCH] [8.17] [8.x] [ftr][deployment-agnostic] move APM tests in its own config file (#200562) (#200924) (#203728) # Backport This will backport the following commits from `8.x` to `8.17`: - [[8.x] [ftr][deployment-agnostic] move APM tests in its own config file (#200562) (#200924)](https://github.com/elastic/kibana/pull/200924) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) \n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sqren/backport)\n\n","sha":"e1691eb91d710e3ccbb1422176505bf306c8eb44","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["backport"],"number":200924,"url":"https://github.com/elastic/kibana/pull/200924","mergeCommit":{"message":"[8.x] [ftr][deployment-agnostic] move APM tests in its own config file (#200562) (#200924)\n\n# Backport\n\nThis will backport the following commits from `main` to `8.x`:\n- [[ftr][deployment-agnostic] move APM tests in its own config file\n(#200562)](https://github.com/elastic/kibana/pull/200562)\n\n\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sqren/backport)\n\n","sha":"e1691eb91d710e3ccbb1422176505bf306c8eb44"}},"sourceBranch":"8.x","suggestedTargetBranches":[],"targetPullRequestStates":[]}] BACKPORT--> --- .buildkite/ftr_oblt_serverless_configs.yml | 1 + .buildkite/ftr_oblt_stateful_configs.yml | 1 + .../configs/serverless/oblt.apm.index.ts | 14 ++++++++++++++ .../serverless/oblt.apm.serverless.config.ts | 16 ++++++++++++++++ .../configs/serverless/oblt.index.ts | 5 ++--- .../configs/stateful/oblt.apm.index.ts | 14 ++++++++++++++ .../configs/stateful/oblt.apm.stateful.config.ts | 15 +++++++++++++++ .../configs/stateful/oblt.index.ts | 5 ++--- 8 files changed, 65 insertions(+), 6 deletions(-) create mode 100644 x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.apm.index.ts create mode 100644 x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.apm.serverless.config.ts create mode 100644 x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.apm.index.ts create mode 100644 x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.apm.stateful.config.ts diff --git a/.buildkite/ftr_oblt_serverless_configs.yml b/.buildkite/ftr_oblt_serverless_configs.yml index 9c836bfaf376d..498a6e714ab20 100644 --- a/.buildkite/ftr_oblt_serverless_configs.yml +++ b/.buildkite/ftr_oblt_serverless_configs.yml @@ -24,6 +24,7 @@ disabled: - x-pack/test_serverless/functional/test_suites/observability/config.screenshots.ts # serverless config files that run deployment-agnostic tests - x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts + - x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.apm.serverless.config.ts # Serverless tests only run on main defaultQueue: 'n2-4-spot' diff --git a/.buildkite/ftr_oblt_stateful_configs.yml b/.buildkite/ftr_oblt_stateful_configs.yml index 7655ce6de38cf..6cad97ecc4456 100644 --- a/.buildkite/ftr_oblt_stateful_configs.yml +++ b/.buildkite/ftr_oblt_stateful_configs.yml @@ -52,3 +52,4 @@ enabled: - x-pack/test/functional/apps/apm/config.ts # stateful configs that run deployment-agnostic tests - x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts + - x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.apm.stateful.config.ts diff --git a/x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.apm.index.ts b/x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.apm.index.ts new file mode 100644 index 0000000000000..124166b1f004b --- /dev/null +++ b/x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.apm.index.ts @@ -0,0 +1,14 @@ +/* + * 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 { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; + +export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { + describe('Serverless Observability - Deployment-agnostic APM API integration tests', function () { + // load new oblt APM-only deployment-agnostic test here + loadTestFile(require.resolve('../../apis/observability/apm')); + }); +} diff --git a/x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.apm.serverless.config.ts b/x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.apm.serverless.config.ts new file mode 100644 index 0000000000000..9d4d8b89a7e6f --- /dev/null +++ b/x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.apm.serverless.config.ts @@ -0,0 +1,16 @@ +/* + * 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 { createServerlessTestConfig } from '../../default_configs/serverless.config.base'; + +export default createServerlessTestConfig({ + serverlessProject: 'oblt', + testFiles: [require.resolve('./oblt.apm.index.ts')], + junit: { + reportName: 'Serverless Observability - Deployment-agnostic APM API Integration Tests', + }, +}); diff --git a/x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.index.ts b/x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.index.ts index ead036a9f1a03..3b34dca4d8fb8 100644 --- a/x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.index.ts +++ b/x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.index.ts @@ -7,8 +7,8 @@ import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { - describe('Serverless Observability - Deployment-agnostic api integration tests', () => { - // load new oblt and platform deployment-agnostic test here + describe('Serverless Observability - Deployment-agnostic API integration tests', function () { + // load new oblt (except APM) and platform deployment-agnostic test here loadTestFile(require.resolve('../../apis/console')); loadTestFile(require.resolve('../../apis/core')); loadTestFile(require.resolve('../../apis/management')); @@ -18,6 +18,5 @@ export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) loadTestFile(require.resolve('../../apis/painless_lab')); loadTestFile(require.resolve('../../apis/saved_objects_management')); loadTestFile(require.resolve('../../apis/observability/slo')); - loadTestFile(require.resolve('../../apis/observability/apm')); }); } diff --git a/x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.apm.index.ts b/x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.apm.index.ts new file mode 100644 index 0000000000000..9e7869bfacde0 --- /dev/null +++ b/x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.apm.index.ts @@ -0,0 +1,14 @@ +/* + * 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 { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; + +export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { + describe('Stateful Observability - Deployment-agnostic APM API integration tests', () => { + loadTestFile(require.resolve('../../apis/observability/apm')); + }); +} diff --git a/x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.apm.stateful.config.ts b/x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.apm.stateful.config.ts new file mode 100644 index 0000000000000..e4eca8228aa18 --- /dev/null +++ b/x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.apm.stateful.config.ts @@ -0,0 +1,15 @@ +/* + * 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 { createStatefulTestConfig } from '../../default_configs/stateful.config.base'; + +export default createStatefulTestConfig({ + testFiles: [require.resolve('./oblt.apm.index.ts')], + junit: { + reportName: 'Stateful Observability - Deployment-agnostic APM API Integration Tests', + }, +}); diff --git a/x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.index.ts b/x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.index.ts index c5a3ad90f81f4..4f21d708d4186 100644 --- a/x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.index.ts +++ b/x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.index.ts @@ -8,12 +8,11 @@ import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) { - describe('apis', () => { - // load new oblt deployment-agnostic test here + describe('Stateful Observability - Deployment-agnostic API integration tests', () => { + // load new oblt (except APM) deployment-agnostic tests here loadTestFile(require.resolve('../../apis/observability/alerting')); loadTestFile(require.resolve('../../apis/observability/dataset_quality')); loadTestFile(require.resolve('../../apis/observability/slo')); loadTestFile(require.resolve('../../apis/observability/infra')); - loadTestFile(require.resolve('../../apis/observability/apm')); }); }