mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-28 00:06:53 +01:00
Allow tests to be executed in docker.
Not everyone wants to install postgres locally just to run our tests. Added a small script which allows the developer to run test via docker instead: npm run test:docker closes #146
This commit is contained in:
parent
7e4469e5fd
commit
406b8d8268
@ -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",
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user