mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[ML] Enable transform health rule API tests (#181147)
## Summary Closes https://github.com/elastic/kibana/issues/177215 ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed
This commit is contained in:
parent
14f2d95fd0
commit
be1248ac98
1 changed files with 7 additions and 5 deletions
|
@ -80,8 +80,7 @@ export default function ruleTests({ getService }: FtrProviderContext) {
|
|||
`.internal.alerts-transform.health.alerts-default-000001`
|
||||
);
|
||||
|
||||
// FLAKY: https://github.com/elastic/kibana/issues/177215
|
||||
describe.skip('rule', async () => {
|
||||
describe('rule', async () => {
|
||||
const objectRemover = new ObjectRemover(supertest);
|
||||
let connectorId: string;
|
||||
const transformId = 'test_transform_01';
|
||||
|
@ -134,9 +133,12 @@ export default function ruleTests({ getService }: FtrProviderContext) {
|
|||
const aadDocs = await getAllAADDocs(1);
|
||||
const alertDoc = aadDocs.body.hits.hits[0]._source;
|
||||
expect(alertDoc[ALERT_REASON]).to.be(`Transform test_transform_01 is not started.`);
|
||||
expect(alertDoc[TRANSFORM_HEALTH_RESULTS]).to.eql([
|
||||
{ transform_id: 'test_transform_01', transform_state: 'stopped', health_status: 'green' },
|
||||
]);
|
||||
|
||||
const transformHealthResult = alertDoc[TRANSFORM_HEALTH_RESULTS][0];
|
||||
expect(transformHealthResult.transform_id).to.be('test_transform_01');
|
||||
expect(transformHealthResult.transform_state).to.match(/stopped|stopping/);
|
||||
expect(transformHealthResult.health_status).to.be('green');
|
||||
|
||||
expect(alertDoc[ALERT_RULE_CATEGORY]).to.be(`Transform health`);
|
||||
expect(alertDoc[ALERT_RULE_NAME]).to.be(`Test all transforms`);
|
||||
expect(alertDoc[ALERT_RULE_TYPE_ID]).to.be(`transform_health`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue