TestContainers-Go is a port of a popular Java library TestContainers.
Go version still helps a developer to spin up throwaway real databases in Docker containers, i.e. Postgres, Redis, etc. Realistic integration tests could be run against those containers.
A list of features simplify developer life even more:
- Docker environment autodiscovery
- mapping to random unique host ports
- easy Docker network configuration and sharing
- waiting strategies for a ready status
- containers cleanup guarantees
In demo part integration tests against Postgres and Redis would be shown. For e2e test two services with their dependencies would be started.