Skip to content

Commit

Permalink
Migrate Custom threshold > AVG - PCT - FIRED test to the deployment a…
Browse files Browse the repository at this point in the history
…gnostic framework (#195902)

Part of #183378

## Summary
This PR moves the first Custom threshold rule test to the deployment
agnostic test. The rest will follow in a follow-up PR.

## How to run

To run serverless
```
node scripts/functional_tests_server --config x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts
node scripts/functional_test_runner --config x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts --grep="Custom Threshold rule"
```

To run stateful
```
node scripts/functional_tests_server --config x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts
node scripts/functional_test_runner --config x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts --grep="Custom Threshold rule"
```

### TODO

- [x] #195890
- [x] Test in MKI before merging


#### How to run tests on MKI

According to this
[discussion](elastic/observability-dev#3519 (comment)),
we should test in MKI environment before merging. For details on how to
run in MKI, see [this section of the
document](https://docs.google.com/document/d/1tiax7xoDYwFXYZjRTgVKkVMjN-SQzBWk4yn1JY6Z5UY/edit#heading=h.ece2z8p74izh)
and [this
readme](https://github.com/elastic/kibana/blob/main/x-pack/test_serverless/README.md#run-tests-on-mki).
  • Loading branch information
maryam-saeidi authored Oct 24, 2024
1 parent 1c3705b commit 30f81ce
Show file tree
Hide file tree
Showing 9 changed files with 78 additions and 293 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export default function ({ loadTestFile }: any) {
describe('Observability Rules', () => {
describe('Rules Endpoints', () => {
loadTestFile(require.resolve('./metric_threshold_rule'));
loadTestFile(require.resolve('./custom_threshold_rule/avg_pct_fired'));
loadTestFile(require.resolve('./custom_threshold_rule/p99_pct_fired'));
loadTestFile(require.resolve('./custom_threshold_rule/rate_bytes_fired'));
loadTestFile(require.resolve('./custom_threshold_rule/avg_pct_no_data'));
Expand Down
Loading

0 comments on commit 30f81ce

Please sign in to comment.