kibana/x-pack/test/alerting_api_integration/observability/index.ts
Maryam Saeidi b585ca658a
Migrate Custom threshold duplicated tests to the deployment agnostic framework (#198691)
Closes #183378
Closes #179095

## Summary
This PR moves the Custom threshold rule duplicated API integration tests
to the deployment agnostic test.

## 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] Test in MKI before merging


#### How to run tests on MKI

According to this
[discussion](https://github.com/elastic/observability-dev/issues/3519#issuecomment-2379914274),
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).

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-11-06 06:03:21 -06:00

20 lines
785 B
TypeScript

/*
* 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.
*/
// eslint-disable-next-line import/no-default-export
export default function ({ loadTestFile }: any) {
describe('Observability Rules', () => {
describe('Rules Endpoints', () => {
loadTestFile(require.resolve('./metric_threshold_rule'));
loadTestFile(require.resolve('./custom_threshold_rule_data_view'));
});
describe('Synthetics', () => {
loadTestFile(require.resolve('./synthetics/synthetics_default_rule'));
loadTestFile(require.resolve('./synthetics/custom_status_rule'));
});
});
}