Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yigitsadic/listele
Sample project for multi-layer testing using interfaces, unit tests and dockertest.
https://github.com/yigitsadic/listele
Last synced: about 1 month ago
JSON representation
Sample project for multi-layer testing using interfaces, unit tests and dockertest.
- Host: GitHub
- URL: https://github.com/yigitsadic/listele
- Owner: yigitsadic
- Created: 2021-09-18T09:28:58.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-09-18T16:02:06.000Z (over 3 years ago)
- Last Synced: 2024-06-20T06:33:05.144Z (7 months ago)
- Language: Go
- Size: 65.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# What is this?
> I have mentioned this repository at my blog [post](https://yigitsadic.github.io/2021/09/18/dockertest-example-project.html).
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`
```json
[
{
"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 ./...
```