Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JiaweiWu committed Oct 18, 2022
1 parent 58f9f66 commit 4a9f60d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ function getOutcomeFilter(outcomeFilter: string[]) {
success:
'kibana.alerting.outcome:success OR (event.outcome: success AND NOT kibana.alerting.outcome:*)',
};
return `${outcomeFilter.map((f) => filterMapping[f]).join(' OR ')}`;
return `(${outcomeFilter.map((f) => filterMapping[f]).join(' OR ')})`;
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe('loadExecutionLogAggregations', () => {
id: 'test-id',
dateStart: '2022-03-23T16:17:53.482Z',
dateEnd: '2022-03-23T16:17:53.482Z',
outcomeFilter: ['success', 'unknown'],
outcomeFilter: ['success', 'warning'],
message: 'test-message',
perPage: 10,
page: 0,
Expand Down Expand Up @@ -85,7 +85,7 @@ describe('loadExecutionLogAggregations', () => {
"query": Object {
"date_end": "2022-03-23T16:17:53.482Z",
"date_start": "2022-03-23T16:17:53.482Z",
"filter": "(message: \\"test-message\\" OR error.message: \\"test-message\\") and (event.outcome: success or unknown)",
"filter": "(message: \\"test-message\\" OR error.message: \\"test-message\\") and (kibana.alerting.outcome:success OR (event.outcome: success AND NOT kibana.alerting.outcome:*) OR kibana.alerting.outcome: warning)",
"page": 1,
"per_page": 10,
"sort": "[{\\"timestamp\\":{\\"order\\":\\"asc\\"}}]",
Expand Down

0 comments on commit 4a9f60d

Please sign in to comment.