Add ability to configure IPAM config for CreateNetworkCmd by vuminhkh · Pull Request #550 · docker-java/docker-java
Current coverage is 23.78%
Merging #550 into master will decrease coverage by -0.03% as of
cc0beb0
@@ master #550 diff @@ ====================================== Files 296 296 Stmts 6123 6131 +8 Branches 532 533 +1 Methods 0 0 ====================================== Hit 1458 1458 Partial 85 85 - Missed 4580 4588 +8
Review entire Coverage Diff as of
cc0beb0Powered by Codecov. Updated on successful CI builds.
| CreateNetworkResponse createNetworkResponse = dockerClient.createNetworkCmd().withName(networkName).exec(); | ||
| Network.Ipam.Config config = new Network.Ipam.Config(); | ||
| config.setSubnet("10.67.79.0/24"); | ||
| CreateNetworkResponse createNetworkResponse = dockerClient.createNetworkCmd().withName(networkName).withIpamConfig(config).exec(); |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please create separate test
| import org.testng.annotations.BeforeMethod; | ||
| import org.testng.annotations.BeforeTest; | ||
| import org.testng.annotations.Test; | ||
| import org.testng.annotations.*; |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please don't use hash imports
@vuminhkh Please rename tests to createNetworkWithIpamConfig. Thanks! Beside this it LGTM. @KostyaSha WDYT?
| if (this.ipam == null) { | ||
| this.ipam = new Ipam(); | ||
| } | ||
| this.ipam.getConfig().add(config); |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. In this line.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters