From dcdcbd8388c917a6d456ee5973b9ed076fa0dcc1 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Fri, 20 Oct 2017 15:31:10 +0100 Subject: [PATCH] exit if mock servers fail to start --- .../test/acceptance/coffee/helpers/MockDocUpdaterApi.coffee | 3 +++ .../test/acceptance/coffee/helpers/MockDocstoreApi.coffee | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/services/web/test/acceptance/coffee/helpers/MockDocUpdaterApi.coffee b/services/web/test/acceptance/coffee/helpers/MockDocUpdaterApi.coffee index 07ecc33b9a..aefcd4513a 100644 --- a/services/web/test/acceptance/coffee/helpers/MockDocUpdaterApi.coffee +++ b/services/web/test/acceptance/coffee/helpers/MockDocUpdaterApi.coffee @@ -8,5 +8,8 @@ module.exports = MockDocUpdaterApi = app.listen 3003, (error) -> throw error if error? + .on "error", (error) -> + console.error "error starting MockDocUpdaterApi:", error.message + process.exit(1) MockDocUpdaterApi.run() diff --git a/services/web/test/acceptance/coffee/helpers/MockDocstoreApi.coffee b/services/web/test/acceptance/coffee/helpers/MockDocstoreApi.coffee index 5caed105b9..2133d40b9f 100644 --- a/services/web/test/acceptance/coffee/helpers/MockDocstoreApi.coffee +++ b/services/web/test/acceptance/coffee/helpers/MockDocstoreApi.coffee @@ -24,6 +24,10 @@ module.exports = MockDocStoreApi = app.listen 3016, (error) -> throw error if error? + .on "error", (error) -> + console.error "error starting MockDocStoreApi:", error.message + process.exit(1) -MockDocUpdaterApi.run() + +MockDocStoreApi.run()