summaryrefslogtreecommitdiff
path: root/test/travis
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2015-03-31 10:52:07 -0700
committerelijah <elijah@riseup.net>2015-03-31 10:52:07 -0700
commite4679c66565d0ccae54ffc58a23083841e5585e7 (patch)
tree2cc7fbb5d3e6a48d21a605a8411da38ea8c999e3 /test/travis
parent2365129a1dcbb1231f0ac22d4bf975007a0c460d (diff)
fix travis: use couchdb.admin.yml and pin travis ruby version to one that is installed on travis-ci.org
Diffstat (limited to 'test/travis')
-rw-r--r--test/travis/ruby-version1
-rwxr-xr-xtest/travis/setup_couch.sh17
2 files changed, 18 insertions, 0 deletions
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"'