Using short lived Postgres servers for testing

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. testcontainers-node

    Testcontainers is a NodeJS library that supports tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.

    Echoing the other (dead?) comment here, https://testcontainers.com/ is a great tool for this.

    In our core makefile we have `make pytest` to run standalone unit tests, and then `make pytest_db` to run full database tests using a docker container. The test suite fires up a completely fresh DB, runs migrations against it, and then the test suite proceeds as usual. On a per-module basis a simple fixture is used to determine if the db should get reset for each test, each file, or the entire module.

    Works great on Github actions, too.

    When the test is done, the container and all noise is automatically cleaned up. No state left behind.

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. eugene

    Careful With that Lock, Eugene

    Author of the blog post here -- that looks like exactly what I needed, so I'm probably going to add a dependency to it to https://github.com/kaaveland/eugene/ so I can delete a ton of code. :-)

  4. embedded-postgres

    Java embedded PostgreSQL component for testing (by zonkyio)

    There's a similar JVM version here: https://github.com/zonkyio/embedded-postgres

    It's well maintained and seems to do what it says on the tin. I start it up once across all the suites (managing DB state as required in the suite) and the overhead is very minimal.

  5. testcontainers-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.

    I started to use testcontainers for it, however my biggest problem is that each test needs to start its own container which is slow (right now I have about 20 test cases in my PoC).

    testcontainers allows to stop and start containers and to reset their state to a snapshot, but Go implementation seems to have a bug which I reported recently [1]. It's going to be huge when they fix it, as it will make tests much faster.

    [1]: https://github.com/testcontainers/testcontainers-go/issues/2...

  6. argo-cd

    Declarative Continuous Deployment for Kubernetes

    - You can trigger the process manually or automatically (PR, GH actions, cli tool, API, etc).

    For example, the ArgoCD project uses Bunnyshell to create ephemeral envs on each PR. https://github.com/argoproj/argo-cd/pull/18851

    Disclaimer: I work for Bunnyshell

  7. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Top Resources to Learn Testcontainers

    18 projects | dev.to | 15 Oct 2024
  • How to test Umbraco against a real database

    1 project | dev.to | 17 Apr 2025
  • Ask HN: Go libraries for managing Docker container pools and executing commands

    1 project | news.ycombinator.com | 7 Apr 2025
  • Learning TDD by doing: Umbraco & EF Core

    1 project | dev.to | 7 Apr 2025
  • Unlocking the Power of Testcontainers: Scalable, Reliable, and Efficient Testing

    1 project | dev.to | 10 Mar 2025

Did you know that Go is
the 4th most popular programming language
based on number of references?