From bd0e7aeab9cb853439fa68d28332513157d54f73 Mon Sep 17 00:00:00 2001 From: Azul Date: Mon, 6 Jan 2014 07:32:06 +0100 Subject: initial test for running tapicero on travis ci --- .travis.yml | 6 ++++++ test/config.yaml | 19 +++++++++++++++++++ test/setup_couch.sh | 13 +++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 test/config.yaml create mode 100644 test/setup_couch.sh diff --git a/.travis.yml b/.travis.yml index 984e24a..69f79e6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,2 +1,8 @@ services: - couchdb +notifications: + email: false +before_script: + - "/bin/bash test/setup_couch.sh" + - "bin/tapicero start test/config.yaml" + - "cat /tmp/test-tapicero.log" 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"' -- cgit v1.2.3