// the find
orlangure/gnomock
Test your code without writing mocks with ephemeral Docker containers 📦 Setup popular services with just a couple lines of code ⏱️ No bash, no yaml, only code 💻
Gnomock spins up real Docker containers for your dependencies during tests, so you test against actual Postgres, Redis, Kafka, etc. instead of mocks. It's Go-native with a growing library of presets that handle health checks, seeding, and teardown for you. There's also an HTTP daemon mode if you're not using Go.
The preset model is genuinely well-designed — each one knows how to seed initial state (SQL schema files, Kafka messages, S3 objects) so you don't reimplement that boilerplate per project. Health checks are built into the presets, so `gnomock.Start()` blocks until the container is actually ready, not just running. The preset coverage is broad: Postgres, Redis, Kafka, Elasticsearch, Cassandra, Vault, Azurite, k3s — covering most of what backend services need. The parallel test isolation story is solid; each test gets its own ephemeral container with its own data, so tests don't bleed into each other.
Docker must be running locally — no remote Docker host support that actually works reliably, which kills this in some CI setups and shared dev environments. The HTTP daemon for non-Go languages is an afterthought: you're running a sidecar container to talk to another container, which adds real operational friction and isn't well-documented. The supported version matrix for most presets is narrow and sometimes lags (MongoDB tops out at 5.0, MSSQL at 2019), so if you're on newer versions you're on your own. Star count relative to testcontainers-go suggests the community is smaller, meaning slower preset updates and fewer answered issues.