Skip to content

Commit

Permalink
fix usafe of getEventLog
Browse files Browse the repository at this point in the history
  • Loading branch information
gmmorris committed Nov 24, 2020
1 parent f0c2673 commit 44886c5
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -518,12 +518,10 @@ export default function ({ getService }: FtrProviderContext) {
type: 'action',
id: actionId,
provider: 'actions',
actions: ['execute'],
actions: new Map([['execute', { equal: 1 }]]),
});
});

expect(events.length).to.equal(1);

const event = events[0];

const duration = event?.event?.duration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1096,12 +1096,10 @@ instanceStateValue: true
type: 'alert',
id: alertId,
provider: 'alerting',
actions: ['execute'],
actions: new Map([['execute', { gte: 1 }]]),
});
});

expect(events.length).to.be.greaterThan(0);

const event = events[0];

const duration = event?.event?.duration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default function eventLogTests({ getService }: FtrProviderContext) {
type: 'alert',
id: alertId,
provider: 'alerting',
actions: ['execute'],
actions: new Map([['execute', { gte: 1 }]]),
});
const errorEvents = someEvents.filter(
(event) => event?.kibana?.alerting?.status === 'error'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,12 +270,10 @@ export default function ({ getService }: FtrProviderContext) {
type: 'action',
id: actionId,
provider: 'actions',
actions: ['execute'],
actions: new Map([['execute', { equal: 1 }]]),
});
});

expect(events.length).to.equal(1);

const event = events[0];

const duration = event?.event?.duration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ export default function createGetAlertInstanceSummaryTests({ getService }: FtrPr
type: 'alert',
id,
provider: 'alerting',
actions,
actions: new Map(actions.map((action) => [action, { gte: 1 }])),
});
});
}
Expand Down

0 comments on commit 44886c5

Please sign in to comment.