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.82k stars 176 forks source link

Support OneShotStartupCheckStrategy like testcontainers-java #731

Closed omerlh closed 2 weeks ago

omerlh commented 4 months ago

Hey! Very happy users of testcontainers here :) We have a use case where we need something similar to OneShotStartupCheckStrategy that test containers java supports. It is pretty easy to implement it ourselves using StartupCheckStrategy but I am also happy contribute the code back to the library so others could use it as well.

While trying to write and test for it I am getting weird error:

Container runtime strategy "UnixSocketStrategy" does not work TypeError: dockerode.info is not a function 

I added the exception to find out why my tests are not passing and this is the additional string on the error. Happens both locally and when running on codespaces. What am I a doing wrong? I would like help so I could open a pull request - i pushed my (not working changes) to a branch - #730.

cristianrgreco commented 4 months ago

Hey @omerlh, thanks for contributing! I'll reply with feedback on the PR on the PR itself

cristianrgreco commented 2 weeks ago

Added in https://github.com/testcontainers/testcontainers-node/pull/730