Skip to content

Commit

Permalink
Update test snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasolson committed Mar 4, 2021
1 parent 0cbba18 commit abb9191
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 20 deletions.
4 changes: 2 additions & 2 deletions src/plugins/data/common/search/aggs/buckets/filters.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ describe('Filters Agg', () => {
"should": Array [
Object {
"match": Object {
"field": 200,
"field": "200",
},
},
],
Expand All @@ -171,7 +171,7 @@ describe('Filters Agg', () => {
Object {
"range": Object {
"field": Object {
"gt": 500,
"gt": "500",
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,7 @@ describe('get_filter', () => {
should: [
{
bool: {
should: [{ match: { 'suricata.eve.alert.signature_id': 2610182 } }],
should: [{ match: { 'suricata.eve.alert.signature_id': '2610182' } }],
minimum_should_match: 1,
},
},
Expand All @@ -1021,7 +1021,7 @@ describe('get_filter', () => {
{
bool: {
should: [
{ match: { 'suricata.eve.alert.signature_id': 2610183 } },
{ match: { 'suricata.eve.alert.signature_id': '2610183' } },
],
minimum_should_match: 1,
},
Expand All @@ -1032,7 +1032,9 @@ describe('get_filter', () => {
{
bool: {
should: [
{ match: { 'suricata.eve.alert.signature_id': 2610184 } },
{
match: { 'suricata.eve.alert.signature_id': '2610184' },
},
],
minimum_should_match: 1,
},
Expand All @@ -1045,7 +1047,7 @@ describe('get_filter', () => {
should: [
{
match: {
'suricata.eve.alert.signature_id': 2610185,
'suricata.eve.alert.signature_id': '2610185',
},
},
],
Expand All @@ -1060,7 +1062,8 @@ describe('get_filter', () => {
should: [
{
match: {
'suricata.eve.alert.signature_id': 2610186,
'suricata.eve.alert.signature_id':
'2610186',
},
},
],
Expand All @@ -1072,7 +1075,8 @@ describe('get_filter', () => {
should: [
{
match: {
'suricata.eve.alert.signature_id': 2610187,
'suricata.eve.alert.signature_id':
'2610187',
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,8 @@ describe('Combined Queries', () => {
kqlQuery: { query: '', language: 'kuery' },
kqlMode: 'search',
})!;
expect(filterQuery).toEqual(
'{"bool":{"must":[],"filter":[{"bool":{"should":[{"range":{"@timestamp":{"gte":1521848183232,"lte":1521848183232}}}],"minimum_should_match":1}}],"should":[],"must_not":[]}}'
expect(filterQuery).toMatchInlineSnapshot(
`"{\\"bool\\":{\\"must\\":[],\\"filter\\":[{\\"bool\\":{\\"should\\":[{\\"range\\":{\\"@timestamp\\":{\\"gte\\":\\"1521848183232\\",\\"lte\\":\\"1521848183232\\"}}}],\\"minimum_should_match\\":1}}],\\"should\\":[],\\"must_not\\":[]}}"`
);
});

Expand All @@ -350,8 +350,8 @@ describe('Combined Queries', () => {
kqlQuery: { query: '', language: 'kuery' },
kqlMode: 'search',
})!;
expect(filterQuery).toEqual(
'{"bool":{"must":[],"filter":[{"bool":{"should":[{"range":{"@timestamp":{"gte":1521848183232,"lte":1521848183232}}}],"minimum_should_match":1}}],"should":[],"must_not":[]}}'
expect(filterQuery).toMatchInlineSnapshot(
`"{\\"bool\\":{\\"must\\":[],\\"filter\\":[{\\"bool\\":{\\"should\\":[{\\"range\\":{\\"@timestamp\\":{\\"gte\\":\\"1521848183232\\",\\"lte\\":\\"1521848183232\\"}}}],\\"minimum_should_match\\":1}}],\\"should\\":[],\\"must_not\\":[]}}"`
);
});

Expand All @@ -368,8 +368,8 @@ describe('Combined Queries', () => {
kqlQuery: { query: '', language: 'kuery' },
kqlMode: 'search',
})!;
expect(filterQuery).toEqual(
'{"bool":{"must":[],"filter":[{"bool":{"should":[{"match":{"event.end":1521848183232}}],"minimum_should_match":1}}],"should":[],"must_not":[]}}'
expect(filterQuery).toMatchInlineSnapshot(
`"{\\"bool\\":{\\"must\\":[],\\"filter\\":[{\\"bool\\":{\\"should\\":[{\\"match\\":{\\"event.end\\":\\"1521848183232\\"}}],\\"minimum_should_match\\":1}}],\\"should\\":[],\\"must_not\\":[]}}"`
);
});

Expand All @@ -386,8 +386,8 @@ describe('Combined Queries', () => {
kqlQuery: { query: '', language: 'kuery' },
kqlMode: 'search',
})!;
expect(filterQuery).toEqual(
'{"bool":{"must":[],"filter":[{"bool":{"should":[{"match":{"event.end":1521848183232}}],"minimum_should_match":1}}],"should":[],"must_not":[]}}'
expect(filterQuery).toMatchInlineSnapshot(
`"{\\"bool\\":{\\"must\\":[],\\"filter\\":[{\\"bool\\":{\\"should\\":[{\\"match\\":{\\"event.end\\":\\"1521848183232\\"}}],\\"minimum_should_match\\":1}}],\\"should\\":[],\\"must_not\\":[]}}"`
);
});

Expand Down
8 changes: 4 additions & 4 deletions x-pack/plugins/uptime/server/lib/alerts/status_check.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ describe('status check alert', () => {
"should": Array [
Object {
"match": Object {
"url.port": 12349,
"url.port": "12349",
},
},
],
Expand All @@ -370,7 +370,7 @@ describe('status check alert', () => {
"should": Array [
Object {
"match": Object {
"url.port": 5601,
"url.port": "5601",
},
},
],
Expand All @@ -382,7 +382,7 @@ describe('status check alert', () => {
"should": Array [
Object {
"match": Object {
"url.port": 443,
"url.port": "443",
},
},
],
Expand Down Expand Up @@ -761,7 +761,7 @@ describe('status check alert', () => {
expect(mockAvailability.mock.calls[0]).toMatchInlineSnapshot(`
Array [
Object {
"filters": "{\\"bool\\":{\\"filter\\":[{\\"bool\\":{\\"should\\":[{\\"bool\\":{\\"should\\":[{\\"match\\":{\\"url.port\\":12349}}],\\"minimum_should_match\\":1}},{\\"bool\\":{\\"should\\":[{\\"bool\\":{\\"should\\":[{\\"match\\":{\\"url.port\\":5601}}],\\"minimum_should_match\\":1}},{\\"bool\\":{\\"should\\":[{\\"match\\":{\\"url.port\\":443}}],\\"minimum_should_match\\":1}}],\\"minimum_should_match\\":1}}],\\"minimum_should_match\\":1}},{\\"bool\\":{\\"filter\\":[{\\"bool\\":{\\"should\\":[{\\"match\\":{\\"observer.geo.name\\":\\"harrisburg\\"}}],\\"minimum_should_match\\":1}},{\\"bool\\":{\\"filter\\":[{\\"bool\\":{\\"should\\":[{\\"match\\":{\\"monitor.type\\":\\"http\\"}}],\\"minimum_should_match\\":1}},{\\"bool\\":{\\"should\\":[{\\"bool\\":{\\"should\\":[{\\"match\\":{\\"tags\\":\\"unsecured\\"}}],\\"minimum_should_match\\":1}},{\\"bool\\":{\\"should\\":[{\\"bool\\":{\\"should\\":[{\\"match\\":{\\"tags\\":\\"containers\\"}}],\\"minimum_should_match\\":1}},{\\"bool\\":{\\"should\\":[{\\"match_phrase\\":{\\"tags\\":\\"org:google\\"}}],\\"minimum_should_match\\":1}}],\\"minimum_should_match\\":1}}],\\"minimum_should_match\\":1}}]}}]}}]}}",
"filters": "{\\"bool\\":{\\"filter\\":[{\\"bool\\":{\\"should\\":[{\\"bool\\":{\\"should\\":[{\\"match\\":{\\"url.port\\":\\"12349\\"}}],\\"minimum_should_match\\":1}},{\\"bool\\":{\\"should\\":[{\\"bool\\":{\\"should\\":[{\\"match\\":{\\"url.port\\":\\"5601\\"}}],\\"minimum_should_match\\":1}},{\\"bool\\":{\\"should\\":[{\\"match\\":{\\"url.port\\":\\"443\\"}}],\\"minimum_should_match\\":1}}],\\"minimum_should_match\\":1}}],\\"minimum_should_match\\":1}},{\\"bool\\":{\\"filter\\":[{\\"bool\\":{\\"should\\":[{\\"match\\":{\\"observer.geo.name\\":\\"harrisburg\\"}}],\\"minimum_should_match\\":1}},{\\"bool\\":{\\"filter\\":[{\\"bool\\":{\\"should\\":[{\\"match\\":{\\"monitor.type\\":\\"http\\"}}],\\"minimum_should_match\\":1}},{\\"bool\\":{\\"should\\":[{\\"bool\\":{\\"should\\":[{\\"match\\":{\\"tags\\":\\"unsecured\\"}}],\\"minimum_should_match\\":1}},{\\"bool\\":{\\"should\\":[{\\"bool\\":{\\"should\\":[{\\"match\\":{\\"tags\\":\\"containers\\"}}],\\"minimum_should_match\\":1}},{\\"bool\\":{\\"should\\":[{\\"match_phrase\\":{\\"tags\\":\\"org:google\\"}}],\\"minimum_should_match\\":1}}],\\"minimum_should_match\\":1}}],\\"minimum_should_match\\":1}}]}}]}}]}}",
"range": 35,
"rangeUnit": "d",
"threshold": "99.34",
Expand Down

0 comments on commit abb9191

Please sign in to comment.