From 93925c527fa7d84042dcfa5662e0d9332e6ee6b6 Mon Sep 17 00:00:00 2001 From: Julian Gernun <17549662+jcger@users.noreply.github.com> Date: Tue, 29 Aug 2023 09:50:54 +0200 Subject: [PATCH] fix --- .../spaces_only/tests/alerting/group4/snooze.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/snooze.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/snooze.ts index a3c50337d804f..2af1854e730f7 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/snooze.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/snooze.ts @@ -353,9 +353,12 @@ export default function createSnoozeRuleTests({ getService }: FtrProviderContext .expect(200); objectRemover.add(Spaces.space1.id, createdRule.id, 'rule', 'alerting'); + const dateStart = new Date().toISOString(); const response = await alertUtils.getSnoozeRequest(createdRule.id).send({ snooze_schedule: { ...SNOOZE_SCHEDULE, + // updating the dtstart to the current time because otherwise the snooze might be over already + dtstart: dateStart, duration: 3000, }, }); @@ -371,8 +374,7 @@ export default function createSnoozeRuleTests({ getService }: FtrProviderContext expect(updatedAlert.snooze_schedule).to.eql([ { ...SNOOZE_SCHEDULE, - // updating the dtstart to the current time because otherwise the snooze might be over already - dtstart: new Date().toISOString(), + dtstart: dateStart, duration: 3000, }, ]);