testcontainers/testcontainers-java

Add getMappedPort(Integer originalPort, InternetProtocol protocol)

Open

#554 aperta il 23 gen 2018

Vedi su GitHub
 (11 commenti) (0 reazioni) (0 assegnatari)Java (1588 fork)batch import
good first issueresolution/acknowledgedtype/feature

Metriche repository

Star
 (7535 star)
Metriche merge PR
 (Merge medio 2g 17h) (2 PR mergiate in 30 g)

Descrizione

It will just look so much nicer in my test than

genericContainer.getContainerInfo().getNetworkSettings().getPorts().getBindings().get(new ExposedPort(originalPort, protocol))[0].getHostPortSpec()

I think it has something to do with the law of demeter.

But in all fairness root cause is https://github.com/moby/moby/issues/4635

Guida contributor