-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…90394) * [SECURITY SOLUTIONS] add property include_unmapped (#90341) * simpler fix * remove fields capabilities to get unmapper fields * fix test * bring back test * Update timeline_details.ts Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Patryk Kopyciński <[email protected]>
- Loading branch information
1 parent
5636dbf
commit 3f71ce7
Showing
4 changed files
with
299 additions
and
389 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
...n/server/search_strategy/timeline/factory/events/details/query.events_details.dsl.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { buildTimelineDetailsQuery } from './query.events_details.dsl'; | ||
|
||
describe('buildTimelineDetailsQuery', () => { | ||
it('returns the expected query', () => { | ||
const indexName = '.siem-signals-default'; | ||
const eventId = 'f0a936d50b5b3a5a193d415459c14587fe633f7e519df7b5dc151d56142680e3'; | ||
const docValueFields = [ | ||
{ field: '@timestamp' }, | ||
{ field: 'agent.ephemeral_id' }, | ||
{ field: 'agent.id' }, | ||
{ field: 'agent.name' }, | ||
]; | ||
|
||
const query = buildTimelineDetailsQuery(indexName, eventId, docValueFields); | ||
|
||
expect(query).toMatchInlineSnapshot(` | ||
Object { | ||
"allowNoIndices": true, | ||
"body": Object { | ||
"docvalue_fields": Array [ | ||
Object { | ||
"field": "@timestamp", | ||
}, | ||
Object { | ||
"field": "agent.ephemeral_id", | ||
}, | ||
Object { | ||
"field": "agent.id", | ||
}, | ||
Object { | ||
"field": "agent.name", | ||
}, | ||
], | ||
"query": Object { | ||
"terms": Object { | ||
"_id": Array [ | ||
"f0a936d50b5b3a5a193d415459c14587fe633f7e519df7b5dc151d56142680e3", | ||
], | ||
}, | ||
}, | ||
}, | ||
"ignoreUnavailable": true, | ||
"index": ".siem-signals-default", | ||
"size": 1, | ||
} | ||
`); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.