From 5c18e656cfad9c0dfccf677a4f0a6d88f634db56 Mon Sep 17 00:00:00 2001 From: Antonio Maranhao <30349380+Antonio-Maranhao@users.noreply.github.com> Date: Tue, 6 Mar 2018 14:28:25 -0500 Subject: [PATCH] Allow setting the protocol of the couchdb URL for nightwatch tests (#1058) --- settings.json.default.json | 1 + tasks/fauxton.js | 1 + test/nightwatch_tests/nightwatch.json.underscore | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/settings.json.default.json b/settings.json.default.json index d474c1b5b..9a5e8adc0 100644 --- a/settings.json.default.json +++ b/settings.json.default.json @@ -77,6 +77,7 @@ "fauxton_username": "tester", "password": "testerpass", "fauxton_port": "8000", + "db_protocol": "http", "db_host": "localhost", "db_port": "5984", "custom_commands_path": ["test/nightwatch_tests/custom-commands", "test/nightwatch_tests/custom-commands/auth"], diff --git a/tasks/fauxton.js b/tasks/fauxton.js index 69c257ed0..4a7c7f654 100644 --- a/tasks/fauxton.js +++ b/tasks/fauxton.js @@ -104,6 +104,7 @@ module.exports = function (grunt) { launch_url: this.data.settings.nightwatch.launch_url, fauxton_host: _getHost(this.data.settings.nightwatch.fauxton_ip), fauxton_port: this.data.settings.nightwatch.fauxton_port, + db_protocol: this.data.settings.nightwatch.db_protocol, db_host: this.data.settings.nightwatch.db_host, db_port: this.data.settings.nightwatch.db_port, selenium_port: this.data.settings.nightwatch.selenium_port diff --git a/test/nightwatch_tests/nightwatch.json.underscore b/test/nightwatch_tests/nightwatch.json.underscore index 7ddbd0cb7..dd4d3bd3c 100644 --- a/test/nightwatch_tests/nightwatch.json.underscore +++ b/test/nightwatch_tests/nightwatch.json.underscore @@ -25,7 +25,7 @@ "fauxton_username": "<%- fauxton_username %>", "password": "<%- password %>", "launch_url": "http://<%- fauxton_host %>:<%- fauxton_port %>", - "db_url": "http://<%- fauxton_username %>:<%- password %>@<%- db_host %>:<%- db_port %>", + "db_url": "<%- db_protocol %>://<%- fauxton_username %>:<%- password %>@<%- db_host %>:<%- db_port %>", "selenium_host" : "127.0.0.1", "selenium_port" : "<%- selenium_port %>", "silent" : true,