Some ProTip about Golang unit testing when the app using go-chi and sqlmock.
- Run your docker
- Run
docker-compose up
- Copy paste
.env.sample
to.env
and set your database credential - Run
go run app/main.go
- Run
go test -v ./...
Endpoint | Method | Description |
---|---|---|
/v1/users |
GET |
getting list of users |
v1/users/{id} |
GET |
getting user by user id |