From e4679c66565d0ccae54ffc58a23083841e5585e7 Mon Sep 17 00:00:00 2001 From: elijah Date: Tue, 31 Mar 2015 10:52:07 -0700 Subject: fix travis: use couchdb.admin.yml and pin travis ruby version to one that is installed on travis-ci.org --- test/config/couchdb.admin.yml | 6 ++++++ test/config/couchdb.yml | 5 +++++ test/config/couchdb.yml.admin | 6 ------ test/config/couchdb.yml.user | 5 ----- test/setup_couch.sh | 17 ----------------- test/travis/ruby-version | 1 + test/travis/setup_couch.sh | 17 +++++++++++++++++ 7 files changed, 29 insertions(+), 28 deletions(-) create mode 100644 test/config/couchdb.admin.yml create mode 100644 test/config/couchdb.yml delete mode 100644 test/config/couchdb.yml.admin delete mode 100644 test/config/couchdb.yml.user delete mode 100755 test/setup_couch.sh create mode 100644 test/travis/ruby-version create mode 100755 test/travis/setup_couch.sh (limited to 'test') diff --git a/test/config/couchdb.admin.yml b/test/config/couchdb.admin.yml new file mode 100644 index 0000000..0988bc1 --- /dev/null +++ b/test/config/couchdb.admin.yml @@ -0,0 +1,6 @@ +test: + auto_update_design_doc: false + username: "anna" + password: "secret" + prefix: "" + diff --git a/test/config/couchdb.yml b/test/config/couchdb.yml new file mode 100644 index 0000000..9c8b67b --- /dev/null +++ b/test/config/couchdb.yml @@ -0,0 +1,5 @@ +test: + auto_update_design_doc: false + username: "me" + password: "pwd" + prefix: "" diff --git a/test/config/couchdb.yml.admin b/test/config/couchdb.yml.admin deleted file mode 100644 index 0988bc1..0000000 --- a/test/config/couchdb.yml.admin +++ /dev/null @@ -1,6 +0,0 @@ -test: - auto_update_design_doc: false - username: "anna" - password: "secret" - prefix: "" - diff --git a/test/config/couchdb.yml.user b/test/config/couchdb.yml.user deleted file mode 100644 index 9c8b67b..0000000 --- a/test/config/couchdb.yml.user +++ /dev/null @@ -1,5 +0,0 @@ -test: - auto_update_design_doc: false - username: "me" - password: "pwd" - prefix: "" diff --git a/test/setup_couch.sh b/test/setup_couch.sh deleted file mode 100755 index 0502c12..0000000 --- a/test/setup_couch.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -HOST="http://localhost:5984" -echo "couch version :" -curl -X GET $HOST -echo "creating user :" -curl -HContent-Type:application/json -XPUT $HOST/_users/org.couchdb.user:me --data-binary '{"_id": "org.couchdb.user:me","name": "me","roles": [],"type": "user","password": "pwd"}' -echo "creating databases :" -curl -X PUT $HOST/sessions -curl -X PUT $HOST/users -curl -X PUT $HOST/tickets -echo "restricting database access :" -curl -X PUT $HOST/sessions/_security -Hcontent-type:application/json --data-binary '{"admins":{"names":[],"roles":[]},"members":{"names":["me"],"roles":[]}}' -curl -X PUT $HOST/users/_security -Hcontent-type:application/json --data-binary '{"admins":{"names":[],"roles":[]},"members":{"names":["me"],"roles":[]}}' -curl -X PUT $HOST/tickets/_security -Hcontent-type:application/json --data-binary '{"admins":{"names":[],"roles":[]},"members":{"names":["me"],"roles":[]}}' -echo "adding admin :" -curl -X PUT $HOST/_config/admins/anna -d '"secret"' diff --git a/test/travis/ruby-version b/test/travis/ruby-version new file mode 100644 index 0000000..68b3a4c --- /dev/null +++ b/test/travis/ruby-version @@ -0,0 +1 @@ +1.9.3-p551 diff --git a/test/travis/setup_couch.sh b/test/travis/setup_couch.sh new file mode 100755 index 0000000..0502c12 --- /dev/null +++ b/test/travis/setup_couch.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +HOST="http://localhost:5984" +echo "couch version :" +curl -X GET $HOST +echo "creating user :" +curl -HContent-Type:application/json -XPUT $HOST/_users/org.couchdb.user:me --data-binary '{"_id": "org.couchdb.user:me","name": "me","roles": [],"type": "user","password": "pwd"}' +echo "creating databases :" +curl -X PUT $HOST/sessions +curl -X PUT $HOST/users +curl -X PUT $HOST/tickets +echo "restricting database access :" +curl -X PUT $HOST/sessions/_security -Hcontent-type:application/json --data-binary '{"admins":{"names":[],"roles":[]},"members":{"names":["me"],"roles":[]}}' +curl -X PUT $HOST/users/_security -Hcontent-type:application/json --data-binary '{"admins":{"names":[],"roles":[]},"members":{"names":["me"],"roles":[]}}' +curl -X PUT $HOST/tickets/_security -Hcontent-type:application/json --data-binary '{"admins":{"names":[],"roles":[]},"members":{"names":["me"],"roles":[]}}' +echo "adding admin :" +curl -X PUT $HOST/_config/admins/anna -d '"secret"' -- cgit v1.2.3