testcontainers / 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.
https://testcontainers.com
MIT License
1.96k stars 198 forks source link

Allow to wait for log messages #9

Closed thomaseizinger closed 5 years ago

thomaseizinger commented 5 years ago

Hello from the Rust universe! :)

Thanks for creating a node port of testcontainers!

Context: Some containers take quite a while to start up and open ports before they are actually ready (bitcoin for example).

Possible solution: One way that works well for us in testcontainers-rs is to wait for a particular log message to be emitted:

https://github.com/testcontainers/testcontainers-rs/blob/f2f94f247fbdb87605c8e7dc18a67fa409250578/images/coblox_bitcoincore/src/image.rs#L167-L172

It would be nice if testcontainers-node would support that aswell :) Happy to send PR if you outline how you would like the library to be extended.

cristianrgreco commented 5 years ago

Hi @thomaseizinger, this has been released in version 1.1.18 which is available now 🙂