Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Equivalent to TestContainers.exposeHostPorts? #535

Open
hovinen opened this issue Nov 14, 2023 · 3 comments
Open

Equivalent to TestContainers.exposeHostPorts? #535

hovinen opened this issue Nov 14, 2023 · 3 comments

Comments

@hovinen
Copy link

hovinen commented Nov 14, 2023

I'm working on a test which must expose a service running on the host to a service running in a container.

In Java, this can be done with Testcontainers.exposeHostPorts(localServerPort); as per https://java.testcontainers.org/features/networking/.

I am unable to find an equivalent to this functionality in the Rust crate. How can one do this?

@dezyh
Copy link

dezyh commented Dec 3, 2023

I recommend linking to the actual section which you're referring to so other people don't get confused like me.

@thomaseizinger
Copy link
Collaborator

I am unable to find an equivalent to this functionality in the Rust crate. How can one do this?

It is not supported at the moment. I am not familiar with the Java implementation in how they achieve this.

@mervyn-mccreight
Copy link
Contributor

I think this would indeed be very useful. I'll have a look at it when I find the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants