From 050e22918a4853641f950861d0dffc572005c2c4 Mon Sep 17 00:00:00 2001 From: orangemug Date: Mon, 9 Apr 2018 17:49:56 +0100 Subject: [PATCH] Fix for running within docker. --- config/wdio.conf.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/config/wdio.conf.js b/config/wdio.conf.js index e8839dd..fad2549 100644 --- a/config/wdio.conf.js +++ b/config/wdio.conf.js @@ -25,7 +25,8 @@ exports.config = { coloredLogs: true, bail: 0, screenshotPath: SCREENSHOT_PATH, - host: (isDocker() ? process.env.DOCKER_HOST : "127.0.0.1"), + // Note: This is here because @orangemug currently runs Maputnik inside a docker container. + host: (isDocker() ? "host.docker.internal" : "0.0.0.0"), baseUrl: 'http://localhost', waitforTimeout: 10000, connectionRetryTimeout: 90000, @@ -45,9 +46,9 @@ exports.config = { colors: true } }); - server.listen(testConfig.port, "127.0.0.1", function(err) { + server.listen(testConfig.port, (isDocker() ? "0.0.0.0" : "localhost"), function(err) { if(err) { - reject(); + reject(err); } else { resolve();