Developer workflow, topic 36 of 41
Tests with containers
Optional
A test against a real Postgres finds what a mock hides. Testcontainers, a library for most languages, starts the containers a test needs, waits until they are ready, and removes them afterwards, so each run starts clean.
Compose does the same for a whole stack: start it, run the suite against it, and take it down.
On Opsfolk
Nothing of ours for this topic yet: an article is on its way.
Elsewhere
- TestcontainersOfficial