You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by gl...@apache.org on 2020/02/27 11:43:21 UTC

[couchdb-nano] 01/01: switch to CouchDB 3 for the Travis tests - no admin party in CouchDB 3

This is an automated email from the ASF dual-hosted git repository.

glynnbird pushed a commit to branch travisforcouchdb3
in repository https://gitbox.apache.org/repos/asf/couchdb-nano.git

commit 4024b9409ea77469d654fc69e5d2590c390f3ff4
Author: Glynn Bird <gl...@gmail.com>
AuthorDate: Thu Feb 27 11:43:03 2020 +0000

    switch to CouchDB 3 for the Travis tests - no admin party in CouchDB 3
---
 scripts/run_couchdb_on_travis.sh  | 9 +++++----
 scripts/stop_couchdb_on_travis.sh | 2 +-
 test/notnocked.test.js            | 2 +-
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/scripts/run_couchdb_on_travis.sh b/scripts/run_couchdb_on_travis.sh
index b0d378c..eeefa02 100755
--- a/scripts/run_couchdb_on_travis.sh
+++ b/scripts/run_couchdb_on_travis.sh
@@ -2,12 +2,13 @@
 
 if [ ! -z $TRAVIS ]; then
 	# Install CouchDB Master
-	echo "Starting CouchDB 2.0 Docker"
-	docker run --ulimit nofile=2048:2048 -d -p 5984:5984 couchdb --with-haproxy \
-	    --with-admin-party-please -n 1
+	echo "Starting CouchDB 3 Docker"
+	docker run --ulimit nofile=2048:2048 -d -p 5984:5984 \
+	    --env COUCHDB_USER=admin --env COUCHDB_PASSWORD=admin \
+	    couchdb --with-haproxy -n 1
 
 	# wait for couchdb to start
-	while [ '200' != $(curl -s -o /dev/null -w %{http_code} http://127.0.0.1:5984) ]; do
+	while [ '200' != $(curl -s -o /dev/null -w %{http_code} http://admin:admin@127.0.0.1:5984/_all_dbs) ]; do
 	  echo waiting for couch to load... ;
 	  sleep 1;
 	done
diff --git a/scripts/stop_couchdb_on_travis.sh b/scripts/stop_couchdb_on_travis.sh
index 4f80bce..e1a9049 100755
--- a/scripts/stop_couchdb_on_travis.sh
+++ b/scripts/stop_couchdb_on_travis.sh
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 
 if [ ! -z $TRAVIS ]; then
-  echo "Stopping CouchDB 2.0 Docker"
+  echo "Stopping CouchDB 3 Docker"
   docker stop $(docker ps -a -q)
   docker rm $(docker ps -a -q)
 fi
\ No newline at end of file
diff --git a/test/notnocked.test.js b/test/notnocked.test.js
index 9350963..b5b9322 100644
--- a/test/notnocked.test.js
+++ b/test/notnocked.test.js
@@ -11,7 +11,7 @@
 // the License.
 
 const Nano = require('..')
-const COUCH_URL = 'http://localhost:5984'
+const COUCH_URL = 'http://admin:admin@localhost:5984'
 const nano = Nano(COUCH_URL)
 const dbName = 'notnocked' + new Date().getTime()
 let db