mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
f8dd610924
commit
3291222e0d
1 changed files with 9 additions and 2 deletions
|
@ -17,7 +17,10 @@ import {
|
|||
ResolverNodeStats,
|
||||
ResolverRelatedAlerts,
|
||||
} from '../../../../plugins/security_solution/common/endpoint/types';
|
||||
import { parentEntityId } from '../../../../plugins/security_solution/common/endpoint/models/event';
|
||||
import {
|
||||
parentEntityId,
|
||||
eventId,
|
||||
} from '../../../../plugins/security_solution/common/endpoint/models/event';
|
||||
import { FtrProviderContext } from '../../ftr_provider_context';
|
||||
import {
|
||||
Event,
|
||||
|
@ -167,10 +170,14 @@ const compareArrays = (
|
|||
if (lengthCheck) {
|
||||
expect(expected.length).to.eql(toTest.length);
|
||||
}
|
||||
|
||||
toTest.forEach((toTestEvent) => {
|
||||
expect(
|
||||
expected.find((arrEvent) => {
|
||||
return JSON.stringify(arrEvent) === JSON.stringify(toTestEvent);
|
||||
// we're only checking that the event ids are the same here. The reason we can't check the entire document
|
||||
// is because ingest pipelines are used to add fields to the document when it is received by elasticsearch,
|
||||
// therefore it will not be the same as the document created by the generator
|
||||
return eventId(toTestEvent) === eventId(arrEvent);
|
||||
})
|
||||
).to.be.ok();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue