diff --git a/package.json b/package.json index be066bdd73..156383b5f6 100644 --- a/package.json +++ b/package.json @@ -35,16 +35,12 @@ "start": "node server.js", "start:google": "node examples/google-auth-unleash.js", "start:dev": "NODE_ENV=development supervisor --ignore ./node_modules/,website server-dev.js", - "start:dev:pg": "pg_virtualenv npm run start:dev:pg-chain", - "start:dev:pg-chain": "export DATABASE_URL=postgres://$PGUSER:$PGPASSWORD@localhost:$PGPORT/postgres ; db-migrate up && npm run start:dev", "db-migrate": "db-migrate", "lint": "eslint .", "pretest": "npm run lint", "test": "NODE_ENV=test PORT=4243 ava", "test:docker": "./scripts/docker-postgres.sh", "test:watch": "npm run test -- --watch", - "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", "test:coverage": "nyc --reporter=lcov npm run test", "test:coverage-report": "nyc report --reporter=text-lcov | coveralls" }, diff --git a/scripts/docker-postgres.sh b/scripts/docker-postgres.sh index 5d78b7a854..1b0b9a6720 100755 --- a/scripts/docker-postgres.sh +++ b/scripts/docker-postgres.sh @@ -3,7 +3,7 @@ export POSTGRES_PASSWORD="uleash" echo "starting postgres in docker " -HASH=`docker run -P --name unleash-postgres -e POSTGRES_PASSWORD=$POSTGRES_PASSWORD -d postgres:9.3` +HASH=`docker run -P --name unleash-postgres -e POSTGRES_PASSWORD=$POSTGRES_PASSWORD -d postgres:10` export PGPORT=`docker ps| grep unleash-post| awk '{print $(NF-1)}'| awk -F "->" '{print $1}'| awk -F \: '{print $2}'` echo "PGPORT: $PGPORT" echo "" @@ -25,7 +25,7 @@ done export TEST_DATABASE_URL=postgres://postgres:$POSTGRES_PASSWORD@$database_host:$PGPORT/postgres yarn -DATABASE_URL=$TEST_DATABASE_URL ./node_modules/.bin/db-migrate up +DATABASE_URL=$TEST_DATABASE_URL npm run db-migrate -- up yarn test docker stop $HASH docker rm $HASH