couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gar...@apache.org
Subject [7/7] fauxton commit: updated refs/heads/master to ced196a
Date Tue, 12 Jul 2016 17:25:22 GMT
streamline docker selenium


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/0c611774
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/0c611774
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/0c611774

Branch: refs/heads/master
Commit: 0c611774f3427b3a75da5022ce7053fb921e37c7
Parents: 22504bd
Author: Garren Smith <garren.smith@gmail.com>
Authored: Wed Jul 6 09:29:52 2016 +0200
Committer: Garren Smith <garren.smith@gmail.com>
Committed: Tue Jul 12 19:24:44 2016 +0200

----------------------------------------------------------------------
 docker/dc.selenium-debug.yml             | 7 +++++++
 docker/dc.selenium.yml                   | 1 +
 package.json                             | 4 ++--
 settings.json.default.json               | 1 -
 tasks/fauxton.js                         | 8 ++++++--
 test/nightwatch_tests/helpers/helpers.js | 1 +
 6 files changed, 17 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0c611774/docker/dc.selenium-debug.yml
----------------------------------------------------------------------
diff --git a/docker/dc.selenium-debug.yml b/docker/dc.selenium-debug.yml
index 98dd11b..3b1a36e 100644
--- a/docker/dc.selenium-debug.yml
+++ b/docker/dc.selenium-debug.yml
@@ -1,8 +1,15 @@
 version: '2'
 services:
   selenium:
+    extends:
+      file: './dc.selenium.yml'
+      service: selenium
     container_name: selenium
     image: selenium/standalone-firefox-debug:2.48.2
     ports:
       - "4444:4444"
       - "5900:5900"
+  couchdb:
+    extends:
+      file: './dc.selenium.yml'
+      service: couchdb

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0c611774/docker/dc.selenium.yml
----------------------------------------------------------------------
diff --git a/docker/dc.selenium.yml b/docker/dc.selenium.yml
index f5004df..6fe625c 100644
--- a/docker/dc.selenium.yml
+++ b/docker/dc.selenium.yml
@@ -5,6 +5,7 @@ services:
     image: selenium/standalone-firefox:2.48.2
     ports:
       - "4444:4444"
+
   couchdb:
     container_name: couchdb
     image: klaemo/couchdb:2.0-dev

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0c611774/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index e2ccc52..1cd6ad8 100644
--- a/package.json
+++ b/package.json
@@ -113,11 +113,11 @@
     "create:animaldb": "./bin/create-animal-db",
     "docker:couchdb-up": "docker-compose -f ./docker/dc.selenium.yml up -d couchdb",
     "docker:selenium-up": "docker-compose -f ./docker/dc.selenium.yml up -d selenium",
-    "docker:selenium-debug-up": "docker-compose -f ./docker/dc.selenium.yml -f ./docker/dc.selenium-debug.yml
up -d selenium",
+    "docker:selenium-debug-up": "docker-compose -f ./docker/dc.selenium-debug.yml up -d selenium",
     "docker:reset": "npm run docker:down && npm run docker:up",
     "docker:logs": "docker logs couchdb",
     "docker:up": "docker-compose -f ./docker/dc.selenium.yml up -d",
-    "docker:debug-up": "docker-compose -f ./docker/dc.selenium.yml -f ./docker/dc.selenium-debug.yml
up -d",
+    "docker:debug-up": "docker-compose -f ./docker/dc.selenium-debug.yml up -d",
     "docker:down": "docker-compose -f ./docker/dc.selenium.yml down"
   },
   "repository": {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0c611774/settings.json.default.json
----------------------------------------------------------------------
diff --git a/settings.json.default.json b/settings.json.default.json
index 0fbd829..a484d35 100644
--- a/settings.json.default.json
+++ b/settings.json.default.json
@@ -76,7 +76,6 @@
     "nightwatch": {
       "fauxton_username": "tester",
       "password": "testerpass",
-      "fauxton_host": "127.0.0.1",
       "fauxton_port": "8000",
       "db_host": "localhost",
       "db_port": "5984",

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0c611774/tasks/fauxton.js
----------------------------------------------------------------------
diff --git a/tasks/fauxton.js b/tasks/fauxton.js
index 4b7fa6c..779261a 100644
--- a/tasks/fauxton.js
+++ b/tasks/fauxton.js
@@ -158,7 +158,7 @@ module.exports = function (grunt) {
       fauxton_username: this.data.settings.nightwatch.fauxton_username,
       password: this.data.settings.nightwatch.password,
       launch_url: this.data.settings.nightwatch.launch_url,
-      fauxton_host: _getHostIpAddresss(),
+      fauxton_host: _getHost(),
       fauxton_port: this.data.settings.nightwatch.fauxton_port,
       db_host: this.data.settings.nightwatch.db_host,
       db_port: this.data.settings.nightwatch.db_port,
@@ -169,7 +169,11 @@ module.exports = function (grunt) {
 
   // HELPERS
 
-  function _getHostIpAddresss () {
+  //if FAUXTON_HOST not set use ip address
+  function _getHost () {
+    if (process.env.FAUXTON_HOST) {
+      return process.env.FAUXTON_HOST;
+    }
     //making some assumptions here
     const interfaces = os.networkInterfaces();
     const eth0 = interfaces[Object.keys(interfaces)[1]];

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0c611774/test/nightwatch_tests/helpers/helpers.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/helpers/helpers.js b/test/nightwatch_tests/helpers/helpers.js
index 99af6b5..c087f75 100644
--- a/test/nightwatch_tests/helpers/helpers.js
+++ b/test/nightwatch_tests/helpers/helpers.js
@@ -18,6 +18,7 @@ function getRandomInt(min, max) {
 }
 
 const dbName = 'fauxton-selenium-tests-' + getRandomInt(1, 20000);
+console.log('ssss', process.env.CLOUDANT_PWD, process.env.CLOUDANT_USER);
 
 module.exports = {
   asyncHookTimeout: 20000,


Mime
View raw message