diff --git a/config.js b/config.js index 9637611fc..1379a0be5 100644 --- a/config.js +++ b/config.js @@ -11,6 +11,8 @@ const uniq = require('lodash/uniq'); const ms = require('ms'); const debug = require('debug')('talk:config'); +const localAddress = require('ip').address(); + //============================================================================== // CONFIG INITIALIZATION //============================================================================== @@ -204,10 +206,10 @@ const CONFIG = { if (process.env.NODE_ENV === 'test') { if (!CONFIG.ROOT_URL) { - CONFIG.ROOT_URL = 'http://localhost:3001'; + CONFIG.ROOT_URL = `http://${localAddress}:3001`; } if (!CONFIG.STATIC_URL) { - CONFIG.STATIC_URI = 'http://localhost:3001'; + CONFIG.STATIC_URI = `http://${localAddress}:3001`; } } else if (!CONFIG.ROOT_URL) { throw new Error('TALK_ROOT_URL must be provided'); @@ -261,13 +263,13 @@ CONFIG.JWT_COOKIE_NAMES = uniq(CONFIG.JWT_COOKIE_NAMES.concat([CONFIG.JWT_COOKIE // testing environment. Every new mongo instance comes with a test database by // default, this is consistent with common testing and use case practices. if (process.env.NODE_ENV === 'test' && !CONFIG.MONGO_URL) { - CONFIG.MONGO_URL = 'mongodb://localhost/test'; + CONFIG.MONGO_URL = `mongodb://${localAddress}/test`; } // Reset the redis url in the event it hasn't been overridden and we are in a // testing environment. if (process.env.NODE_ENV === 'test' && !CONFIG.REDIS_URL) { - CONFIG.REDIS_URL = 'redis://localhost/1'; + CONFIG.REDIS_URL = `redis://${localAddress}/1`; } // REDIS_CLUSTER_CONFIGURATION should be parsed when the cluster mode !== none. diff --git a/nightwatch-browserstack.conf.js b/nightwatch-browserstack.conf.js index f31580988..a08bec2b3 100644 --- a/nightwatch-browserstack.conf.js +++ b/nightwatch-browserstack.conf.js @@ -54,10 +54,8 @@ const nightwatch_config = { }, safari: { desiredCapabilities: { - - // Safari since 8 seems to have troubles with the browserstack-local tunnel (10.18.17) browser: 'safari', - browser_version: '10', + browser_version: '11', }, }, ie: {