Skip to content

Sample project for multi-layer testing using interfaces, unit tests and dockertest.

Notifications You must be signed in to change notification settings

yigitsadic/listele

Repository files navigation

What is this?

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 ./...

About

Sample project for multi-layer testing using interfaces, unit tests and dockertest.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published