[SecuritySolution] Unskip uncommon_processes·ts (#95343)
* wrap with retry * wrap with retry * wrap tests with retry Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
41e247f29f
commit
643760dfec
|
@ -24,76 +24,17 @@ const TO = '3000-01-01T00:00:00.000Z';
|
|||
const TOTAL_COUNT = 3;
|
||||
|
||||
export default function ({ getService }: FtrProviderContext) {
|
||||
const retry = getService('retry');
|
||||
const esArchiver = getService('esArchiver');
|
||||
const supertest = getService('supertest');
|
||||
|
||||
// FLAKY: https://github.com/elastic/kibana/issues/94535
|
||||
describe.skip('uncommon_processes', () => {
|
||||
describe('uncommon_processes', () => {
|
||||
before(() => esArchiver.load('auditbeat/uncommon_processes'));
|
||||
after(() => esArchiver.unload('auditbeat/uncommon_processes'));
|
||||
|
||||
it('should return an edge of length 1 when given a pagination of length 1', async () => {
|
||||
const { body: UncommonProcesses } = await supertest
|
||||
.post('/internal/search/securitySolutionSearchStrategy/')
|
||||
.set('kbn-xsrf', 'true')
|
||||
.send({
|
||||
factoryQueryType: HostsQueries.uncommonProcesses,
|
||||
sourceId: 'default',
|
||||
timerange: {
|
||||
interval: '12h',
|
||||
to: TO,
|
||||
from: FROM,
|
||||
},
|
||||
pagination: {
|
||||
activePage: 0,
|
||||
cursorStart: 0,
|
||||
fakePossibleCount: 3,
|
||||
querySize: 1,
|
||||
},
|
||||
defaultIndex: ['auditbeat-uncommon-processes'],
|
||||
docValueFields: [],
|
||||
inspect: false,
|
||||
})
|
||||
.expect(200);
|
||||
expect(UncommonProcesses.edges.length).to.be(1);
|
||||
});
|
||||
|
||||
describe('when given a pagination of length 2', () => {
|
||||
let response: null | UncommonProcessesResponse = null;
|
||||
|
||||
before(async () => {
|
||||
response = await supertest
|
||||
.post('/internal/search/securitySolutionSearchStrategy/')
|
||||
.set('kbn-xsrf', 'true')
|
||||
.send({
|
||||
factoryQueryType: HostsQueries.uncommonProcesses,
|
||||
sourceId: 'default',
|
||||
timerange: {
|
||||
interval: '12h',
|
||||
to: TO,
|
||||
from: FROM,
|
||||
},
|
||||
pagination: {
|
||||
activePage: 0,
|
||||
cursorStart: 0,
|
||||
fakePossibleCount: 3,
|
||||
querySize: 2,
|
||||
},
|
||||
defaultIndex: ['auditbeat-uncommon-processes'],
|
||||
docValueFields: [],
|
||||
inspect: false,
|
||||
wait_for_completion_timeout: '10s',
|
||||
});
|
||||
});
|
||||
it('should return an edge of length 2 ', () => {
|
||||
expect(response!.body.edges.length).to.be(2);
|
||||
});
|
||||
});
|
||||
|
||||
describe('when given a pagination of length 1', () => {
|
||||
let response: null | UncommonProcessesResponse = null;
|
||||
before(async () => {
|
||||
response = await supertest
|
||||
await retry.try(async () => {
|
||||
const response = await supertest
|
||||
.post('/internal/search/securitySolutionSearchStrategy/')
|
||||
.set('kbn-xsrf', 'true')
|
||||
.send({
|
||||
|
@ -113,9 +54,73 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
defaultIndex: ['auditbeat-uncommon-processes'],
|
||||
docValueFields: [],
|
||||
inspect: false,
|
||||
wait_for_completion_timeout: '10s',
|
||||
});
|
||||
})
|
||||
.expect(200);
|
||||
expect(response!.body.edges.length).to.be(1);
|
||||
});
|
||||
});
|
||||
|
||||
describe('when given a pagination of length 2', () => {
|
||||
it('should return an edge of length 2 ', async () => {
|
||||
await retry.try(async () => {
|
||||
const response = await supertest
|
||||
.post('/internal/search/securitySolutionSearchStrategy/')
|
||||
.set('kbn-xsrf', 'true')
|
||||
.send({
|
||||
factoryQueryType: HostsQueries.uncommonProcesses,
|
||||
sourceId: 'default',
|
||||
timerange: {
|
||||
interval: '12h',
|
||||
to: TO,
|
||||
from: FROM,
|
||||
},
|
||||
pagination: {
|
||||
activePage: 0,
|
||||
cursorStart: 0,
|
||||
fakePossibleCount: 3,
|
||||
querySize: 2,
|
||||
},
|
||||
defaultIndex: ['auditbeat-uncommon-processes'],
|
||||
docValueFields: [],
|
||||
inspect: false,
|
||||
wait_for_completion_timeout: '10s',
|
||||
})
|
||||
.expect(200);
|
||||
expect(response!.body.edges.length).to.be(2);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('when given a pagination of length 1', () => {
|
||||
let response: null | UncommonProcessesResponse = null;
|
||||
before(async () => {
|
||||
await retry.try(async () => {
|
||||
response = await supertest
|
||||
.post('/internal/search/securitySolutionSearchStrategy/')
|
||||
.set('kbn-xsrf', 'true')
|
||||
.send({
|
||||
factoryQueryType: HostsQueries.uncommonProcesses,
|
||||
sourceId: 'default',
|
||||
timerange: {
|
||||
interval: '12h',
|
||||
to: TO,
|
||||
from: FROM,
|
||||
},
|
||||
pagination: {
|
||||
activePage: 0,
|
||||
cursorStart: 0,
|
||||
fakePossibleCount: 3,
|
||||
querySize: 1,
|
||||
},
|
||||
defaultIndex: ['auditbeat-uncommon-processes'],
|
||||
docValueFields: [],
|
||||
inspect: false,
|
||||
wait_for_completion_timeout: '10s',
|
||||
})
|
||||
.expect(200);
|
||||
});
|
||||
});
|
||||
|
||||
it('should return an edge of length 1 ', () => {
|
||||
expect(response!.body.edges.length).to.be(1);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue