-
Install Doppler and authenticate: https://docs.doppler.com/docs/cli#installation
- Go look at inctructions in doppler.yaml.example
-
Create
server.shfile:
G_CREDS=$(doppler secrets get GOOGLE_APPLICATION_CREDENTIALS --plain)
doppler secrets get GOOGLE_APPLICATION_CREDENTIALS_JSON --plain > $G_CREDS
doppler run --command="npm run dev"- Run
sh server.shin bash.
- In the db project add your configurations in
.envfile e.g.
TEST_POSTGRES_USER=postgres
TEST_POSTGRES_PASSWORD=1234
TEST_MIGRATIONS_HOST=localhost
TEST_MIGRATIONS_PORT=5432- Run a command in the db project to create a test database
neo-bank-test:
npm run test:db:create- To drop the test database
neo-bank-testuse:
npm run test:db:drop- Run a command in the db project to run all migrations:
npm run test:upWhen database is created, create test.sh script using test.sample.sh as template and set environment variables.
To run all tests use:
sh test.sh