Skip to content

Commit

Permalink
fix tets
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 committed Mar 30, 2020
1 parent 28f8fbb commit 56345e1
Showing 1 changed file with 13 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,49 +31,25 @@ describe('getLatestMonitor', () => {
],
},
},
aggs: {
by_id: {
terms: {
field: 'monitor.id',
size: 1000,
},
aggs: {
latest: {
top_hits: {
size: 1,
sort: {
'@timestamp': { order: 'desc' },
},
},
},
},
},
size: 1,
_source: ['url', 'monitor', 'observer', 'tls', '@timestamp'],
sort: {
'@timestamp': { order: 'desc' },
},
size: 0,
},
};
mockEsSearchResult = {
aggregations: {
by_id: {
buckets: [
{
latest: {
hits: {
hits: [
{
_source: {
'@timestamp': 123456,
monitor: {
id: 'testMonitor',
},
},
},
],
},
hits: {
hits: [
{
_source: {
'@timestamp': 123456,
monitor: {
id: 'testMonitor',
},
},
],
},
},
],
},
};
});
Expand Down

0 comments on commit 56345e1

Please sign in to comment.