-
-
Notifications
You must be signed in to change notification settings - Fork 251
Closed
Description
The java version of DockerComposeEnvironment supports getServicePort, which can be used to retrieve dynamic port mappings.
In my usecase I want to start a Compose file with randomized exposed ports for test isolation, but the application under test should still be able to communicate with the services.
A workaround is to use this:
const pgContainer = startedComposeEnv.getContainer('postgres-1');
const pgPort = pgContainer.getMappedPort('5432/tcp')Is the workaround I presented really a workaround, or did you explicitly decide not to do it the java way?
Metadata
Metadata
Assignees
Labels
No labels