A Go library that runs a real PostgreSQL database locally as part of your application or tests.
embedded-postgres is a Go library that allows you to run a real PostgreSQL database locally as part of your Go application or test suite. It solves the problem of needing a realistic database environment for testing without requiring external PostgreSQL installations or relying on less accurate in-memory alternatives.
Go developers who need to test applications with PostgreSQL integration, particularly those writing integration tests or requiring a local database instance for development.
Developers choose embedded-postgres because it provides a real PostgreSQL instance with zero external dependencies, offering higher testing confidence than in-memory alternatives while being easy to configure and integrate into Go projects.
Run a real Postgres database locally on Linux, OSX or Windows as part of another Go application or test
Uses an actual PostgreSQL instance, not an in-memory simulation, providing higher testing confidence for queries, migrations, and features.
Only requires Go; no separate PostgreSQL installation is needed, simplifying setup and CI/CD pipelines as highlighted in the README.
Works on Linux, macOS (with native Apple Silicon support in version 18.3.0+), and Windows, ensuring broad usability across development environments.
Downloads and caches PostgreSQL binaries automatically from Maven, reducing manual setup, though it relies on external repositories.
Requires internet access for initial binary downloads from Maven, which can fail in offline or restricted network environments, breaking test setups.
If binaries are pre-cached, no version check is performed, risking version mismatches without clear errors, as noted in the README's BinaryPath handling.
Versions before 18.3.0 require Rosetta 2 on Apple Silicon Macs, adding complexity and potential performance overhead, which the README explicitly warns about.
A toolkit with common assertions and mocks that plays nicely with the standard library
Open-source platform for creating safe, isolated production sandboxes for API, integration, and E2E testing.
Go testing in the browser. Integrates with `go test`. Write behavioral tests in Go.
Testcontainers for Go is a Go package that makes it simple to create and clean up container-based dependencies for automated integration/smoke tests. The clean, easy-to-use API enables developers to programmatically define containers that should be run as part of a test and clean up those resources when the test is done.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.