Skip to content

Commit

Permalink
Fixing functional test
Browse files Browse the repository at this point in the history
  • Loading branch information
ymao1 committed Jan 27, 2021
1 parent 33a9307 commit 3fad2dd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 3fad2dd

Please sign in to comment.