Add ability to run tests on postgresql 9.1-9.5

This commit is contained in:
Dan Sosedoff
2016-01-15 12:33:30 -06:00
parent 3af20f9327
commit 9766bb2ed2
4 changed files with 96 additions and 13 deletions

20
script/test_all.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
set -e
export PGHOST=${PGHOST:-192.168.99.100}
export PGUSER="postgres"
export PGPASSWORD=""
export PGDATABASE="booktown"
export PGPORT="5432"
for i in {1..5}
do
export PGVERSION="9.$i"
echo "Running tests against PostgreSQL v$PGVERSION"
docker rm -f postgres || true
docker run -p 5432:5432 --name postgres -e POSTGRES_PASSWORD=$PGPASSWORD -d postgres:$PGVERSION
sleep 5
make test
echo "----------"
done