- Go 1.17 or lastest version already installed on your local machine.
- 2 Postgresql servers (one serves as normal database server, and another for running tests). You can use a disposable docker instance for tests
- Ensure your postgres instances are running
- Create and populate a
app.envfile on the project root with its keys and corresponding values as listed inapp-sample.env - Run from project root directory
$ go run main.go- Automated unit and integration tests done with golang's builtin
testingpackage.
To run one test file:
$ go test -v ./tests/<file name> -timeout 99999sTo run all tests:
$ go test -v ./tests/<folder name>/<file name> -timeout 99999s$ go test -v ./tests/... -timeout 99999sNB: Always add timeout tag to prevent early timeout