|
@@ -1289,9 +1289,9 @@ func (s *DockerNetworkSuite) TestDockerNetworkConnectPreferredIP(c *testing.T) {
|
|
verifyIPAddresses(c, "c0", "n0", "172.28.99.88", "2001:db8:1234::9988")
|
|
verifyIPAddresses(c, "c0", "n0", "172.28.99.88", "2001:db8:1234::9988")
|
|
|
|
|
|
// connect the container to the second network specifying an ip addresses
|
|
// connect the container to the second network specifying an ip addresses
|
|
- dockerCmd(c, "network", "connect", "--ip", "172.30.55.44", "--ip6", "2001:db8:abcd::5544", "n1", "c0")
|
|
|
|
- verifyIPAddressConfig(c, "c0", "n1", "172.30.55.44", "2001:db8:abcd::5544")
|
|
|
|
- verifyIPAddresses(c, "c0", "n1", "172.30.55.44", "2001:db8:abcd::5544")
|
|
|
|
|
|
+ dockerCmd(c, "network", "connect", "--ip", "172.30.5.44", "--ip6", "2001:db8:abcd::5544", "n1", "c0")
|
|
|
|
+ verifyIPAddressConfig(c, "c0", "n1", "172.30.5.44", "2001:db8:abcd::5544")
|
|
|
|
+ verifyIPAddresses(c, "c0", "n1", "172.30.5.44", "2001:db8:abcd::5544")
|
|
|
|
|
|
// Stop and restart the container
|
|
// Stop and restart the container
|
|
dockerCmd(c, "stop", "c0")
|
|
dockerCmd(c, "stop", "c0")
|
|
@@ -1300,8 +1300,8 @@ func (s *DockerNetworkSuite) TestDockerNetworkConnectPreferredIP(c *testing.T) {
|
|
// verify requested addresses are applied and configs are still there
|
|
// verify requested addresses are applied and configs are still there
|
|
verifyIPAddressConfig(c, "c0", "n0", "172.28.99.88", "2001:db8:1234::9988")
|
|
verifyIPAddressConfig(c, "c0", "n0", "172.28.99.88", "2001:db8:1234::9988")
|
|
verifyIPAddresses(c, "c0", "n0", "172.28.99.88", "2001:db8:1234::9988")
|
|
verifyIPAddresses(c, "c0", "n0", "172.28.99.88", "2001:db8:1234::9988")
|
|
- verifyIPAddressConfig(c, "c0", "n1", "172.30.55.44", "2001:db8:abcd::5544")
|
|
|
|
- verifyIPAddresses(c, "c0", "n1", "172.30.55.44", "2001:db8:abcd::5544")
|
|
|
|
|
|
+ verifyIPAddressConfig(c, "c0", "n1", "172.30.5.44", "2001:db8:abcd::5544")
|
|
|
|
+ verifyIPAddresses(c, "c0", "n1", "172.30.5.44", "2001:db8:abcd::5544")
|
|
|
|
|
|
// Still it should fail to connect to the default network with a specified IP (whatever ip)
|
|
// Still it should fail to connect to the default network with a specified IP (whatever ip)
|
|
out, _, err := dockerCmdWithError("network", "connect", "--ip", "172.21.55.44", "bridge", "c0")
|
|
out, _, err := dockerCmdWithError("network", "connect", "--ip", "172.21.55.44", "bridge", "c0")
|