Testcontainers

Engineering Practices

Tests run against real PostgreSQL and Redis, because a mock encodes what we believe.

A library that starts real dependencies in containers for the duration of a test run and disposes of them afterwards.

How we use it

Database tests run against a real PostgreSQL, not a substitute. A mocked database agrees with whatever the test author believed, which is exactly the belief the test was meant to check.

9

systems