From 777925c5751de1c13143a88fb40053f2cf0dd43a Mon Sep 17 00:00:00 2001 From: John Schulz Date: Tue, 4 Aug 2020 15:45:33 -0400 Subject: [PATCH] Return the promise from setup so test passes --- x-pack/plugins/ingest_manager/server/services/setup.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/x-pack/plugins/ingest_manager/server/services/setup.ts b/x-pack/plugins/ingest_manager/server/services/setup.ts index c91cae98e17d2..4ef093d38879a 100644 --- a/x-pack/plugins/ingest_manager/server/services/setup.ts +++ b/x-pack/plugins/ingest_manager/server/services/setup.ts @@ -127,6 +127,11 @@ export async function setupIngestManager( // if anything errors, reject/fail onSetupReject(error); } + + // be sure to return the promise because it has the resolved/rejected status attached to it + // otherwise, we effectively return success every time even if there are errors + // because `return undefined` -> `Promise.resolve(undefined)` in an `async` function + return setupIngestStatus; } export async function setupFleet(