Using short lived Postgres servers for testing

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

InfluxDB - Purpose built for real-time analytics at any scale.
InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • 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.

  • InfluxDB

    Purpose built for real-time analytics at any scale. InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.

    InfluxDB logo
  • 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. :-)

  • 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.

  • 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...

  • 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

  • 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

  • TestContainers para testes de integração com .Net

    2 projects | dev.to | 10 Sep 2024
  • TestContainers for integration testing .Net applications

    2 projects | dev.to | 10 Sep 2024
  • Testcontainers + Golang: Melhorando seus testes com Docker

    2 projects | dev.to | 16 Jul 2024
  • Revolutionize Your Unit Testing with Testcontainers and Docker

    1 project | dev.to | 31 May 2024
  • How Enabling Slow Query Log Enhances Postgres Observability

    2 projects | dev.to | 30 May 2024

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