Skip to content

Commit d4d8b6a

Browse files
committed
Fix test
1 parent b9ec245 commit d4d8b6a

File tree

1 file changed

+40
-45
lines changed

1 file changed

+40
-45
lines changed

x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_filter.test.ts

Lines changed: 40 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -192,71 +192,66 @@ describe('get_filter', () => {
192192
index: ['auditbeat-*'],
193193
lists: [getExceptionListItemSchemaMock()],
194194
});
195+
195196
expect(filter).toEqual({
196197
bool: {
198+
must: [],
197199
filter: [
198200
{
199201
bool: {
200-
filter: [
202+
should: [
201203
{
202-
bool: {
203-
minimum_should_match: 1,
204-
should: [
205-
{
206-
match: {
207-
'host.name': 'siem',
208-
},
209-
},
210-
],
204+
match: {
205+
'host.name': 'siem',
211206
},
212207
},
213-
{
214-
bool: {
215-
filter: [
216-
{
217-
nested: {
218-
path: 'some.parentField',
219-
query: {
220-
bool: {
221-
minimum_should_match: 1,
222-
should: [
223-
{
224-
match: {
225-
'some.parentField.nested.field': 'some value',
226-
},
208+
],
209+
minimum_should_match: 1,
210+
},
211+
},
212+
{
213+
bool: {
214+
must_not: {
215+
bool: {
216+
filter: [
217+
{
218+
nested: {
219+
path: 'some.parentField',
220+
query: {
221+
bool: {
222+
should: [
223+
{
224+
match_phrase: {
225+
'some.parentField.nested.field': 'some value',
227226
},
228-
],
229-
},
227+
},
228+
],
229+
minimum_should_match: 1,
230230
},
231-
score_mode: 'none',
232231
},
232+
score_mode: 'none',
233233
},
234-
{
235-
bool: {
236-
must_not: {
237-
bool: {
238-
minimum_should_match: 1,
239-
should: [
240-
{
241-
match: {
242-
'some.not.nested.field': 'some value',
243-
},
244-
},
245-
],
234+
},
235+
{
236+
bool: {
237+
should: [
238+
{
239+
match_phrase: {
240+
'some.not.nested.field': 'some value',
246241
},
247242
},
248-
},
243+
],
244+
minimum_should_match: 1,
249245
},
250-
],
251-
},
246+
},
247+
],
252248
},
253-
],
249+
},
254250
},
255251
},
256252
],
257-
must: [],
258-
must_not: [],
259253
should: [],
254+
must_not: [],
260255
},
261256
});
262257
});

0 commit comments

Comments
 (0)