From e78484109ae7bd9fd8300775fcf5028b5a3bb006 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Fri, 20 Sep 2019 18:52:20 +0100 Subject: [PATCH] selenium: Only load 'sauce' service when needed MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Also, remove the redundant unprefixed `user` and `key` options. These would be cleaner to set through `sauceConnectOpts` as `sauceConnectOpts { username: …, accesskey: … }`, but even that isn't needed because wdio-sauce-service already reads these same environment variables directly. No further config needed. Also remove the duplication of default variables we don't have any particular preference for yet so that enjoy improvements to these when upgrading. Change-Id: I0d4802f83509b0b49f775560b508d9929ae9979e --- tests/selenium/wdio.conf.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/tests/selenium/wdio.conf.js b/tests/selenium/wdio.conf.js index 6512e7db87..72a89dd606 100644 --- a/tests/selenium/wdio.conf.js +++ b/tests/selenium/wdio.conf.js @@ -39,16 +39,8 @@ exports.config = { // Sauce Labs // ====== // See http://webdriver.io/guide/services/sauce.html - // and https://docs.saucelabs.com/reference/platforms-configurator - services: [ 'sauce' ], - user: process.env.SAUCE_USERNAME, - key: process.env.SAUCE_ACCESS_KEY, - - // Default timeout in milliseconds for Selenium Grid requests - connectionRetryTimeout: 90 * 1000, - - // Default request retries count - connectionRetryCount: 3, + // and https://github.com/bermi/sauce-connect-launcher#advanced-usage + services: process.env.SAUCE_ACCESS_KEY ? [ 'sauce' ] : [], // ================== // Test Files -- 2.20.1