summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2014-01-06 07:32:06 +0100
committerAzul <azul@riseup.net>2014-02-04 11:46:57 +0100
commitbd0e7aeab9cb853439fa68d28332513157d54f73 (patch)
tree0cf9ee2a85e1b5bc971b1472e547299a1e75a511
parent02834750009a22d518bd9bfba7eaaa063811062a (diff)
initial test for running tapicero on travis ci
-rw-r--r--.travis.yml6
-rw-r--r--test/config.yaml19
-rw-r--r--test/setup_couch.sh13
3 files changed, 38 insertions, 0 deletions
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"'