I have mentioned this repository at my blog post.
This is an example project to implement unit-tests, interfaces, database integration tests with docker.
Application serves records found on people
table as JSON list.
To run docker-compose up
curl http://localhost:3035 | jq
[
{
"full_name": "John Doe"
},
{
"full_name": "Aida Bugg"
},
{
"full_name": "Maureen Biologist"
},
{
"full_name": "Allie Grater"
}
]
Run tests:
go test ./...
Run tests with database integration tests:
RUN_INTEGRATION_TESTS=YES go test ./...