As part of this PR we introduce a way to write deployment agnostic tests using Mocha tagging. Tests should be written in the new observability_solution_api_integration folder and should be tagged with the @ess and @serverless tags.
create a new custom_threshold folder within alerting folder
move custom threshold rule tests there
Create serverless.config.ts and ess.config.ts files similar to the burn_rate rule in this PR
Add the new config files in .buildkite/ftr_configs.yml
Tag the tests with @ess @serverless tags
create 2 script commands in the package.json of the observability_solution_api_integration folder similar to the burn_rate commands.
For ESS
start the server using your new alias alerting_custom_threshold:server:ess
start the test runner using the new alias alerting_custom_threshold:runner:ess
For Serverless
start the server using your new alias alerting_custom_threshold:server:serverless
start the test runner using the new alias alerting_custom_threshold:runner:serverless
Notes
It might be that more things need to be done in order to have these tests fully migrated to the new folder structure. For example custom threshold rule tests are currently defined in a feature flag file x-pack/test_serverless/api_integration/test_suites/observability/index.feature_flags.ts
Part of https://github.com/elastic/kibana/issues/183263
🍒 Summary
As part of this PR we introduce a way to write deployment agnostic tests using Mocha tagging. Tests should be written in the new
observability_solution_api_integration
folder and should be tagged with the@ess and @serverless
tags.Existing tests
Serverless:
x-pack/test_serverless/api_integration/test_suites/observability/custom_threshold_rule
ESS:x-pack/test/alerting_api_integration/observability/custom_threshold_rule
New folder structure
How to migrate
custom_threshold
folder within alerting folderserverless.config.ts
andess.config.ts
files similar to the burn_rate rule in this PR.buildkite/ftr_configs.yml
@ess @serverless
tagspackage.json
of the observability_solution_api_integration folder similar to the burn_rate commands.alerting_custom_threshold:server:ess
alerting_custom_threshold:runner:ess
alerting_custom_threshold:server:serverless
alerting_custom_threshold:runner:serverless
Notes
It might be that more things need to be done in order to have these tests fully migrated to the new folder structure. For example custom threshold rule tests are currently defined in a feature flag file
x-pack/test_serverless/api_integration/test_suites/observability/index.feature_flags.ts