diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/config.yaml | 19 | ||||
-rw-r--r-- | test/setup_couch.sh | 13 |
2 files changed, 32 insertions, 0 deletions
diff --git a/test/config.yaml b/test/config.yaml new file mode 100644 index 0000000..6719eb4 --- /dev/null +++ b/test/config.yaml @@ -0,0 +1,19 @@ +# +# Default configuration options for Tapicero +# + +# couch connection configuration +connection: + protocol: "http" + host: "localhost" + port: 5984 + username: anna + password: secret + prefix: "test" + suffix: "" + +# file to store the last processed user record in so we can resume after +# a restart: +seq_file: "/tmp/test-tapicero.seq" +log_file: "/tmp/test-tapicero.log" +log_level: debug diff --git a/test/setup_couch.sh b/test/setup_couch.sh new file mode 100644 index 0000000..026c15c --- /dev/null +++ b/test/setup_couch.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +HOST="http://localhost:5984" +echo "couch version :" +curl -X GET $HOST +echo "creating unprivileged 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 database to watch:" +curl -X PUT $HOST/test-users +echo "restricting database access :" +curl -X PUT $HOST/test-users/_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"' |