mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[RAM] Fix Failing test: X-Pack Alerting API Integration Tests - Alerting - group1.x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group1/get_alert_summary·ts (#164759)
## Summary Fix: https://github.com/elastic/kibana/issues/156792 https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2987
This commit is contained in:
parent
8e661224f0
commit
6c2cd6048d
1 changed files with 21 additions and 23 deletions
|
@ -25,8 +25,7 @@ export default function createGetAlertSummaryTests({ getService }: FtrProviderCo
|
|||
const retry = getService('retry');
|
||||
const alertUtils = new AlertUtils({ space: Spaces.space1, supertestWithoutAuth });
|
||||
|
||||
// FLAKY: https://github.com/elastic/kibana/issues/156792
|
||||
describe.skip('getAlertSummary', () => {
|
||||
describe('getAlertSummary', () => {
|
||||
const objectRemover = new ObjectRemover(supertest);
|
||||
|
||||
afterEach(() => objectRemover.removeAll());
|
||||
|
@ -272,6 +271,26 @@ export default function createGetAlertSummaryTests({ getService }: FtrProviderCo
|
|||
});
|
||||
|
||||
it('handles multi-alert status during maintenance window', async () => {
|
||||
const { body: createdMaintenanceWindow } = await supertest
|
||||
.post(`${getUrlPrefix(Spaces.space1.id)}/internal/alerting/rules/maintenance_window`)
|
||||
.set('kbn-xsrf', 'foo')
|
||||
.send({
|
||||
title: 'test-maintenance-window',
|
||||
duration: 60 * 60 * 1000, // 1 hr
|
||||
r_rule: {
|
||||
dtstart: new Date().toISOString(),
|
||||
tzid: 'UTC',
|
||||
freq: 2, // weekly
|
||||
},
|
||||
});
|
||||
objectRemover.add(
|
||||
Spaces.space1.id,
|
||||
createdMaintenanceWindow.id,
|
||||
'rules/maintenance_window',
|
||||
'alerting',
|
||||
true
|
||||
);
|
||||
|
||||
// pattern of when the rule should fire
|
||||
const pattern = {
|
||||
alertA: [true, true, true, true],
|
||||
|
@ -293,27 +312,6 @@ export default function createGetAlertSummaryTests({ getService }: FtrProviderCo
|
|||
|
||||
objectRemover.add(Spaces.space1.id, createdRule.id, 'rule', 'alerting');
|
||||
|
||||
const { body: createdMaintenanceWindow } = await supertest
|
||||
.post(`${getUrlPrefix(Spaces.space1.id)}/internal/alerting/rules/maintenance_window`)
|
||||
.set('kbn-xsrf', 'foo')
|
||||
.send({
|
||||
title: 'test-maintenance-window',
|
||||
duration: 60 * 60 * 1000, // 1 hr
|
||||
r_rule: {
|
||||
dtstart: new Date().toISOString(),
|
||||
tzid: 'UTC',
|
||||
freq: 2, // weekly
|
||||
},
|
||||
});
|
||||
|
||||
objectRemover.add(
|
||||
Spaces.space1.id,
|
||||
createdMaintenanceWindow.id,
|
||||
'rules/maintenance_window',
|
||||
'alerting',
|
||||
true
|
||||
);
|
||||
|
||||
await alertUtils.muteInstance(createdRule.id, 'alertC');
|
||||
await alertUtils.muteInstance(createdRule.id, 'alertD');
|
||||
await waitForEvents(createdRule.id, ['new-instance', 'recovered-instance']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue