Replies: 1 comment 1 reply
-
Hi, |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I really like using Testcontainers for integration tests, thanks for all the effort!
One thing I'm often struggling with, when quickly iterating over a test multiple times in order to debug and make the test succeed, sometimes I want to look into the 3rd party system I'm running with Testcontainers (e.g. SQL database, checking which records are created). Since by default Testcontainers uses a random port to expose the given service, I'll be continuously modifying my SQL client configuration to connect to the correct database port.
I'm aware we can start containers on a specific port, but that would cause problems in normal pipeline test runs where multiple tests might be running in parallel.
Is there a way to define a preferred or 'sticky' port number, that will be used when available, but have Testcontainers just fall back to its normal operation mode of choosing a random port whenever this preferred port is not available?
Beta Was this translation helpful? Give feedback.
All reactions