test(integration): make em at least run locally

This commit is contained in:
Stephan Bönnemann
2015-07-19 16:21:40 +02:00
parent 22a283a027
commit ddaec4f2bf
8 changed files with 53 additions and 22 deletions
+1 -1
View File
@@ -8,5 +8,5 @@ const opts = {
module.exports = {
start: exec.bind(null, './start.sh', opts),
stop: exec.bind(null, './stop.sh', opts),
uri: 'http://localhost:5984/registry/_design/app/_rewrite/'
uri: 'http://localhost:15986/registry/_design/app/_rewrite/'
}
+9 -6
View File
@@ -1,16 +1,19 @@
[couchdb]
database_dir = data
view_index_dir = data
delayed_commits = false
[couch_httpd_auth]
public_fields = appdotnet, avatar, avatarMedium, avatarLarge, date, email, fields, freenode, fullname, github, homepage, name, roles, twitter, type, _id, _rev
users_db_public = true
[httpd]
bind_address = 0.0.0.0
port = 15986
bind_address = 127.0.0.1
secure_rewrites = false
[couchdb]
delayed_commits = false
[log]
file = couch/couch.log
[admins]
admin = -pbkdf2-89582b49cd2e8443e29a841f5a76d367956a8e58,1afa2f1531a17ac97f2ac9e334293753,10
[log]
level = none
+14 -3
View File
@@ -5,10 +5,21 @@ set -e
cd $(dirname $0)
# start couchdb as a background process, reset config, load local config
couchdb -b -a local.ini
mkdir -p couch
COUCH=http://admin:password@127.0.0.1:5984
# start couchdb as a background process, load local config, specify writable logfiles
if [[ $TRAVIS = true ]]
then
echo 'starting couch with sudo'
sudo couchdb -b -a local.ini -p couch/pid -o couch/stdout.log -e couch/stderr.log
else
couchdb -b -a local.ini -p couch/pid -o couch/stdout.log -e couch/stderr.log
fi
# wait for couch to start
sleep 5
COUCH=http://admin:password@127.0.0.1:15986
# create "registry" database
curl -X PUT $COUCH/registry
+8 -6
View File
@@ -1,10 +1,12 @@
#!/bin/bash
# delete "registry" database
curl -X DELETE http://admin:password@127.0.0.1:5984/registry
# delete "_users" database
curl -X DELETE http://admin:password@127.0.0.1:5984/_users
# close couchdb background process
couchdb -d
# delete data and logs
cd $(dirname $0)
cat couch/{couch,stdout,stderr}.log
rm -rf couch
rm -rf data