From dffedcf44eb366cfda310f5742a9adbc5db585dc Mon Sep 17 00:00:00 2001 From: Nicolas Chaulet Date: Thu, 18 Jun 2020 08:46:06 -0400 Subject: [PATCH] [IngestManager] fix endpoint setup in api integration tests --- .../test/api_integration/services/ingest_manager.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/x-pack/test/api_integration/services/ingest_manager.ts b/x-pack/test/api_integration/services/ingest_manager.ts index bcba36cef42b7..96b1b97a68dc9 100644 --- a/x-pack/test/api_integration/services/ingest_manager.ts +++ b/x-pack/test/api_integration/services/ingest_manager.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ import { FtrProviderContext } from '../ftr_provider_context'; -import { setupRouteService, fleetSetupRouteService } from '../../../plugins/ingest_manager/common'; +import { fleetSetupRouteService } from '../../../plugins/ingest_manager/common'; export function IngestManagerProvider({ getService }: FtrProviderContext) { const supertest = getService('supertest'); @@ -12,14 +12,11 @@ export function IngestManagerProvider({ getService }: FtrProviderContext) { async setup() { const headers = { accept: 'application/json', 'kbn-xsrf': 'some-xsrf-token' }; - const { body } = await supertest - .get(fleetSetupRouteService.getFleetSetupPath()) + await supertest + .post(fleetSetupRouteService.postFleetSetupPath()) .set(headers) + .send({ forceRecreate: true }) .expect(200); - - if (!body.isInitialized) { - await supertest.post(setupRouteService.getSetupPath()).set(headers).expect(200); - } }, }; }