testcontainers/testcontainers-java

Add getMappedPort(Integer originalPort, InternetProtocol protocol)

オープン

#554 opened on 2018/01/23

 (12 件のコメント) (0 件のリアクション) (0 人の担当者)Java (1,588 件のフォーク)batch import
good first issueresolution/acknowledgedtype/feature

Repository metrics

Stars
 (7,535 個のスター)
PR merge metrics
 (平均マージ 2d 17h) (30d で 2 merged PRs)

説明

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

コントリビューターガイド