diff options
author | Azul <azul@riseup.net> | 2016-08-15 11:31:40 +0200 |
---|---|---|
committer | Azul <azul@riseup.net> | 2016-08-15 11:41:36 +0200 |
commit | 58c63cac98cdacc6ec7230e1133bcb35f0f22582 (patch) | |
tree | fd6944b3ecd5ad29c8586dd4c8cc28d7a224761c /config/ci/travis/setup_couch.sh | |
parent | 75c037e5d6d8b8f2b98477bdd0359f5687bd7517 (diff) |
[ci] move configs into config dir
Diffstat (limited to 'config/ci/travis/setup_couch.sh')
-rwxr-xr-x | config/ci/travis/setup_couch.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/config/ci/travis/setup_couch.sh b/config/ci/travis/setup_couch.sh new file mode 100755 index 0000000..0502c12 --- /dev/null +++ b/config/ci/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"' |