Skip to content

Commit

Permalink
[ftr][deployment-agnostic] move APM tests in its own config file (#20…
Browse files Browse the repository at this point in the history
…0562)

## Summary

Part of #199182

With great progress of #193245 the number of tests in Observability
deployment-agnostic config files is growing and so does config run time
by reaching **30** minutes.

As we try to keep pipeline runtime reasonable, this PR adds a new
configs `oblt.apm.stateful.config.ts` and
`oblt.apm.serverless.config.ts` that load only APM-related tests from
https://github.com/elastic/kibana/blob/main/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/index.ts

It should help to speed up execution, we will double check config
runtime when APM test migration is completed.

For reviewers: no extra work is expected from Oblt teams if new tests
are still imported in
`x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/index.ts`
  • Loading branch information
dmlemeshko authored Nov 20, 2024
1 parent 07f311e commit a851276
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 6 deletions.
1 change: 1 addition & 0 deletions .buildkite/ftr_oblt_serverless_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ enabled:
- 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
1 change: 1 addition & 0 deletions .buildkite/ftr_oblt_stateful_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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 { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context';

export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) {
describe('Serverless Observability - Deployment-agnostic APM API integration tests', function () {
this.tags(['esGate']);

// load new oblt APM-only deployment-agnostic test here
loadTestFile(require.resolve('../../apis/observability/apm'));
});
}
Original file line number Diff line number Diff line change
@@ -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',
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context';

export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) {
describe('Serverless Observability - Deployment-agnostic api integration tests', function () {
describe('Serverless Observability - Deployment-agnostic API integration tests', function () {
this.tags(['esGate']);

// load new oblt and platform deployment-agnostic test here
// 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'));
Expand All @@ -20,6 +20,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'));
});
}
Original file line number Diff line number Diff line change
@@ -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'));
});
}
Original file line number Diff line number Diff line change
@@ -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',
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
});
}

0 comments on commit a851276

Please sign in to comment.