Giter VIP home page Giter VIP logo

Comments (3)

thomaseizinger avatar thomaseizinger commented on May 30, 2024

Is there any plan to add it?

At the moment no because we don't have a need for it right now.

It would be good to have an equivalent of the GenericContainer Java class to easily use custom images.

Would containers created in this way have any "wait strategy" attached to them? How do you know when they are ready to be interacted with? From the docs of testcontainers-java, I assume this feature is then not available?

I guess we could start out with a simple generic container and add parametrized wait strategies later on.

I don't think I will have time to work on this soon, so you are free to give it a go if you are keen :)

from testcontainers-rs.

ufoscout avatar ufoscout commented on May 30, 2024

Would containers created in this way have any "wait strategy" attached to them? How do you know when they are ready to be interacted with? From the docs of testcontainers-java, I assume this feature is then not available?

Yes, they have a DSL that permits to define everything, including a wait strategy. For example, this is the way I create a custom Postgres image:

public GenericContainer containerWithWaitStrategy = new GenericContainer("postgres:9.6-alpine")
                    .withEnv("POSTGRES_PASSWORD", "postgres")
                    .withEnv("POSTGRES_USER", "postgres")
                    .withExposedPorts(5432)
                    .waitingFor(
                            Wait.forListeningPort()
                           // OR: Wait.forLogMessage(".*ready to accept connections*\\s", 1)
                    );

from testcontainers-rs.

D4nte avatar D4nte commented on May 30, 2024

Closed in #58

from testcontainers-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.