diff --git a/packages/unleash-api/package.json b/packages/unleash-api/package.json index eb6e0dbcad..99b823f840 100644 --- a/packages/unleash-api/package.json +++ b/packages/unleash-api/package.json @@ -40,6 +40,7 @@ "test": "export PORT=4243 ; mocha --recursive test && npm run test:coverage", "test:unit": "mocha test/unit/**/*.js ", "test:ci": "npm run db-migrate && npm run test", + "test:docker": "./scripts/docker-postgres.sh", "test:watch": "mocha --watch test test/*", "test:pg-virtualenv": "pg_virtualenv npm run test:pg-virtualenv-chai", "test:pg-virtualenv-chain": "export TEST_DATABASE_URL=postgres://$PGUSER:$PGPASSWORD@localhost:$PGPORT/postgres ; npm run db-migrate-testdb && npm test", diff --git a/packages/unleash-api/scripts/docker-postgres.sh b/packages/unleash-api/scripts/docker-postgres.sh index f89ae9b238..a9ddf21e14 100755 --- a/packages/unleash-api/scripts/docker-postgres.sh +++ b/packages/unleash-api/scripts/docker-postgres.sh @@ -22,7 +22,7 @@ do done -export TEST_DATABASE_URL=postgres://postgres:unleash@$database_host:$PGPORT/postgres +export TEST_DATABASE_URL=postgres://postgres:$POSTGRES_PASSWORD@$database_host:$PGPORT/postgres npm install DATABASE_URL=$TEST_DATABASE_URL ./node_modules/.bin/db-migrate up