Skip to content

Simplify internals #655

Description

@kegsay

The idea of running docker containers in Go tests isn't new. It was reasonably new back when Complement started, but now there are libraries we could use instead, notably https://github.com/testcontainers/testcontainers-go

We should consider using this internally. This would be transparent to tests as they have a separate API shape, and greatly simplify the burden of maintaining Complement internals, as the cost of an extra dependency. This dependency though is backed by a number of companies and does test containers for other languages as well, not just Go.

Activity

  1. added this to the v1 milestone on Oct 2, 2023
  2. mdelapenya commented on Oct 31, 2024

    @mdelapenya

    Hi from Testcontaines for Go! 👋 I landed here after a quick search on Github. Please let us know if we can help out adopting the project.

  3. kegsay commented on Jan 21, 2025

    @kegsay
    MemberAuthor

    I've extensively used testcontainers for other end-to-end style tests in CI and it seems for the most part to work well, though ryuk seems a little too eager in terminating running containers for some reason. Nonetheless, the original issue still stands, it reduces the complexity burden of maintaining Complement, it's just something we need to actually get around to doing.

  4. mdelapenya commented on Jan 21, 2025

    @mdelapenya

    Thanks for letting me know! We worked in having a more robust Ryuk in terms of how it prunes containers. You probably want to give it a try to the latest version of testcontainers-go, which includes the ability to use the settings described in here: https://github.com/testcontainers/moby-ryuk?tab=readme-ov-file#ryuk-configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions