Skip to content

Commit

Permalink
fix rebase issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dhurley14 committed Jun 16, 2021
1 parent 1673dc9 commit 7aeac69
Showing 1 changed file with 39 additions and 27 deletions.
66 changes: 39 additions & 27 deletions x-pack/test/api_integration/apis/security_solution/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -470,41 +470,53 @@ export default function ({ getService }: FtrProviderContext) {
});
});

it.skip('Make sure that we get Timeline data using the hunter role and do not receive observability alerts', async () => {
it.only('Make sure that we get Timeline data using the hunter role and do not receive observability alerts', async () => {
await retry.try(async () => {
const requestBody = {
defaultIndex: ['.alerts*'], // query both .alerts-observability-apm and .alerts-security-solution
docValueFields: [{ field: '*' }],
factoryQueryType: TimelineEventsQueries.all,
fieldRequested: FIELD_REQUESTED,
fields: [],
filterQuery: {
bool: {
filter: [
{
match_all: {},
},
],
},
},
pagination: {
activePage: 0,
querySize: 25,
},
language: 'kuery',
sort: [
{
field: '@timestamp',
direction: Direction.desc,
type: 'number',
},
],
timerange: {
from: FROM,
to: TO,
interval: '12h',
},
};
console.error('REQUEST BODY', JSON.stringify(requestBody, null, 2));
const resp = await supertestWithoutAuth
.post('/internal/search/securitySolutionTimelineSearchStrategy/')
.auth(secOnly.username, secOnly.password)
.set('kbn-xsrf', 'true')
.set('Content-Type', 'application/json')
.send({
defaultIndex: ['.alerts*'], // query both .alerts-observability-apm and .alerts-security-solution
docValueFields: DOC_VALUE_FIELDS,
factoryQueryType: TimelineEventsQueries.all,
fieldRequested: FIELD_REQUESTED,
fields: [],
filterQuery: FILTER_VALUE,
pagination: {
activePage: 0,
querySize: 25,
},
language: 'kuery',
sort: [
{
field: '@timestamp',
direction: Direction.desc,
type: 'number',
},
],
timerange: {
from: FROM,
to: TO,
interval: '12h',
},
})
.expect(200);
.send(requestBody);
// .expect(200);
console.error('WHAT IS THE RESP', JSON.stringify(resp, null, 2));

const timeline = resp.body;
console.error('TIMELINE', JSON.stringify(timeline, null, 2));

expect(timeline.totalCount).to.be(1);
});
Expand Down

0 comments on commit 7aeac69

Please sign in to comment.