Skip to content

Commit

Permalink
update api integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
darnautov committed Jul 4, 2023
1 parent faafc8e commit 1ca657a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,16 @@ export default function alertTests({ getService }: FtrProviderContext) {

const docs = await waitForDocs(1);
for (const doc of docs) {
const { name, message } = doc._source.params;
const { name, message, anomalyExplorerUrl } = doc._source.params;

expect(name).to.be('Test AD job');
expect(message).to.be(
'Alerts are raised based on real-time scores. Remember that scores may be adjusted over time as data continues to be analyzed.'
);
// check only part of the URL as time bounds vary based on the anomaly
expect(anomalyExplorerUrl).to.contain(
'/s/space1/app/ml/explorer/?_g=(ml%3A(jobIds%3A!(rt-anomaly-mean-value))'
);
}
});

Expand Down Expand Up @@ -166,6 +170,7 @@ export default function alertTests({ getService }: FtrProviderContext) {
params: {
name: '{{{alertName}}}',
message: '{{{context.message}}}',
anomalyExplorerUrl: '{{{context.anomalyExplorerUrl}}}',
},
},
],
Expand Down

0 comments on commit 1ca657a

Please sign in to comment.