diff --git a/scripts/docker-postgres.sh b/scripts/docker-postgres.sh index 93e4a38c1e..e3c73eb612 100755 --- a/scripts/docker-postgres.sh +++ b/scripts/docker-postgres.sh @@ -1,10 +1,10 @@ #!/bin/bash export POSTGRES_PASSWORD="uleash" -export DATABASE_URL=postgres://postgres:unleash@127.0.0.1:15432/postgres +export TEST_DATABASE_URL=postgres://postgres:unleash@127.0.0.1:15432/postgres HASH=`docker run -p 127.0.0.1:15432:5432 --name unleash-postgres -e POSTGRES_PASSWORD=$POSTGRES_PASSWORD -d postgres:9.3` npm install -./node_modules/.bin/db-migrate up +DATABASE_URL=$TEST_DATABASE_URL ./node_modules/.bin/db-migrate up npm test docker stop $HASH docker rm $HASH