Skip to content

Commit a5350e7

Browse files
committed
[IngestManager] fix endpoint setup in api integration tests (#69503)
1 parent c521487 commit a5350e7

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

x-pack/test/api_integration/services/ingest_manager.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,19 @@
44
* you may not use this file except in compliance with the Elastic License.
55
*/
66
import { FtrProviderContext } from '../ftr_provider_context';
7-
import { setupRouteService, fleetSetupRouteService } from '../../../plugins/ingest_manager/common';
7+
import { fleetSetupRouteService } from '../../../plugins/ingest_manager/common';
88

99
export function IngestManagerProvider({ getService }: FtrProviderContext) {
1010
const supertest = getService('supertest');
1111
return {
1212
async setup() {
1313
const headers = { accept: 'application/json', 'kbn-xsrf': 'some-xsrf-token' };
1414

15-
const { body } = await supertest
16-
.get(fleetSetupRouteService.getFleetSetupPath())
15+
await supertest
16+
.post(fleetSetupRouteService.postFleetSetupPath())
1717
.set(headers)
18+
.send({ forceRecreate: true })
1819
.expect(200);
19-
20-
if (!body.isInitialized) {
21-
await supertest.post(setupRouteService.getSetupPath()).set(headers).expect(200);
22-
}
2320
},
2421
};
2522
}

0 commit comments

Comments
 (0)