docker run \
--mount type=bind,source="$(pwd)/database",target=/docker-entrypoint-initdb.d \
--publish 5432:5432 \
postgres
docker build --tag=payments .
docker run \
--network=host \
payments -db "postgres://[email protected]:5432/payments?sslmode=disable"
go test ./...
docker run --rm \
--mount type=bind,source="$(pwd)",target=/go/src/github.com/VMitov/payments
golang go test github.com/VMitov/payments/...
- Start the database as shown above.
go test ./... -integration