From 3fad2dd5f7a69e9811f0ca91e61a75d587ef6c5d Mon Sep 17 00:00:00 2001 From: Ying Mao Date: Wed, 27 Jan 2021 12:02:48 -0500 Subject: [PATCH] Fixing functional test --- .../tests/alerting/builtin_alert_types/es_query/alert.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/builtin_alert_types/es_query/alert.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/builtin_alert_types/es_query/alert.ts index cd1f82061a76c..a1ae35a29bf23 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/builtin_alert_types/es_query/alert.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/builtin_alert_types/es_query/alert.ts @@ -86,7 +86,7 @@ export default function alertTests({ getService }: FtrProviderContext) { expect(name).to.be('always fire'); expect(title).to.be(`alert 'always fire' matched query`); - const messagePattern = /alert 'always fire' is active:\n\n- Value: \d+\n- Conditions Met: number of matching documents is greater than -1 over 15s\n- Timestamp: \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/; + const messagePattern = /alert 'always fire' is active:\n\n- Value: \d+\n- Conditions Met: Number of matching documents is greater than -1 over 15s\n- Timestamp: \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/; expect(message).to.match(messagePattern); expect(hits).not.to.be.empty(); @@ -142,7 +142,7 @@ export default function alertTests({ getService }: FtrProviderContext) { expect(name).to.be('fires once'); expect(title).to.be(`alert 'fires once' matched query`); - const messagePattern = /alert 'fires once' is active:\n\n- Value: \d+\n- Conditions Met: number of matching documents is greater than or equal to 0 over 15s\n- Timestamp: \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/; + const messagePattern = /alert 'fires once' is active:\n\n- Value: \d+\n- Conditions Met: Number of matching documents is greater than or equal to 0 over 15s\n- Timestamp: \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/; expect(message).to.match(messagePattern); expect(hits).not.to.be.empty(); expect(previousTimestamp).to.be.empty();