mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 01:13:23 -04:00
Fixes Failing test: X-Pack Alerting API Integration Tests - Alerting - group3.x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group3/builtin_alert_types/es_query/rule·ts - Alerting builtin alertTypes es_query rule runs correctly: threshold on ungrouped hit count < > for esQuery search type (#215604)
Resolves https://github.com/elastic/kibana/issues/194701 ## Summary The rule conditions are testing that the doc count > -1 but we're testing that the evaluated value is > 0. Because an evaluated value of 0 will also match the rule condition, occasionally this expect would fail. Updated the test to match what is allowed by the rule condition. --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
0bb73eec2c
commit
df728ab823
1 changed files with 2 additions and 3 deletions
|
@ -50,8 +50,7 @@ export default function ruleTests({ getService }: FtrProviderContext) {
|
|||
{ label: 'host.name', searchPath: 'host.name' },
|
||||
];
|
||||
|
||||
// FLAKY: https://github.com/elastic/kibana/issues/194701
|
||||
describe.skip('rule', () => {
|
||||
describe('rule', () => {
|
||||
let endDate: string;
|
||||
let connectorId: string;
|
||||
const objectRemover = new ObjectRemover(supertest);
|
||||
|
@ -183,7 +182,7 @@ export default function ruleTests({ getService }: FtrProviderContext) {
|
|||
);
|
||||
expect(alertDoc['kibana.alert.evaluation.threshold']).to.eql(-1);
|
||||
const value = parseInt(alertDoc['kibana.alert.evaluation.value'], 10);
|
||||
expect(value).greaterThan(0);
|
||||
expect(value >= 0).to.be(true);
|
||||
expect(alertDoc[ALERT_URL]).to.contain('/s/space1/app/');
|
||||
expect(alertDoc['host.name']).to.eql(['host-1']);
|
||||
expect(alertDoc['host.hostname']).to.eql(['host-1']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue