Skip to content

Commit

Permalink
Return the promise from setup so test passes
Browse files Browse the repository at this point in the history
  • Loading branch information
John Schulz committed Aug 4, 2020
1 parent afd064a commit 777925c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions x-pack/plugins/ingest_manager/server/services/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 777925c

Please sign in to comment.