Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
cnasikas committed Jul 15, 2020
1 parent b9ec245 commit d4d8b6a
Showing 1 changed file with 40 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,71 +192,66 @@ describe('get_filter', () => {
index: ['auditbeat-*'],
lists: [getExceptionListItemSchemaMock()],
});

expect(filter).toEqual({
bool: {
must: [],
filter: [
{
bool: {
filter: [
should: [
{
bool: {
minimum_should_match: 1,
should: [
{
match: {
'host.name': 'siem',
},
},
],
match: {
'host.name': 'siem',
},
},
{
bool: {
filter: [
{
nested: {
path: 'some.parentField',
query: {
bool: {
minimum_should_match: 1,
should: [
{
match: {
'some.parentField.nested.field': 'some value',
},
],
minimum_should_match: 1,
},
},
{
bool: {
must_not: {
bool: {
filter: [
{
nested: {
path: 'some.parentField',
query: {
bool: {
should: [
{
match_phrase: {
'some.parentField.nested.field': 'some value',
},
],
},
},
],
minimum_should_match: 1,
},
score_mode: 'none',
},
score_mode: 'none',
},
{
bool: {
must_not: {
bool: {
minimum_should_match: 1,
should: [
{
match: {
'some.not.nested.field': 'some value',
},
},
],
},
{
bool: {
should: [
{
match_phrase: {
'some.not.nested.field': 'some value',
},
},
},
],
minimum_should_match: 1,
},
],
},
},
],
},
],
},
},
},
],
must: [],
must_not: [],
should: [],
must_not: [],
},
});
});
Expand Down

0 comments on commit d4d8b6a

Please sign in to comment.