mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[SECURITY_SOLUTION] Retry on ingest setup (#75000)
This commit is contained in:
parent
187a13075b
commit
8aa8b04cee
1 changed files with 8 additions and 5 deletions
|
@ -8,15 +8,18 @@ import { fleetSetupRouteService } from '../../../plugins/ingest_manager/common';
|
|||
|
||||
export function IngestManagerProvider({ getService }: FtrProviderContext) {
|
||||
const supertest = getService('supertest');
|
||||
const retry = getService('retry');
|
||||
return {
|
||||
async setup() {
|
||||
const headers = { accept: 'application/json', 'kbn-xsrf': 'some-xsrf-token' };
|
||||
|
||||
await supertest
|
||||
.post(fleetSetupRouteService.postFleetSetupPath())
|
||||
.set(headers)
|
||||
.send({ forceRecreate: true })
|
||||
.expect(200);
|
||||
await retry.try(async () => {
|
||||
await supertest
|
||||
.post(fleetSetupRouteService.postFleetSetupPath())
|
||||
.set(headers)
|
||||
.send({ forceRecreate: true })
|
||||
.expect(200);
|
||||
});
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue