Skip to content

Commit

Permalink
Update tests w/ new libnetwork contraints
Browse files Browse the repository at this point in the history
The TestDockerNetworkIPAMMultipleNetworks test allocates several
networks simultaneously with overlapping IP addresses.  Libnetwork now
forbids this.  Adjust the test case to use distinct IP ranges for the
networks it creates.

Signed-off-by: Chris Telfer <ctelfer@docker.com>
(cherry picked from commit efb7909)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
ctelfer authored and thaJeztah committed Jul 3, 2018
1 parent a0c213f commit cc1b68d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions integration-cli/docker_cli_network_unix_test.go
Expand Up @@ -610,17 +610,17 @@ func (s *DockerNetworkSuite) TestDockerNetworkIPAMMultipleNetworks(c *check.C) {
// test network with multiple subnets
// bridge network doesn't support multiple subnets. hence, use a dummy driver that supports

dockerCmd(c, "network", "create", "-d", dummyNetworkDriver, "--subnet=192.168.0.0/16", "--subnet=192.170.0.0/16", "test6")
dockerCmd(c, "network", "create", "-d", dummyNetworkDriver, "--subnet=192.170.0.0/16", "--subnet=192.171.0.0/16", "test6")
assertNwIsAvailable(c, "test6")

// test network with multiple subnets with valid ipam combinations
// also check same subnet across networks when the driver supports it.
dockerCmd(c, "network", "create", "-d", dummyNetworkDriver,
"--subnet=192.168.0.0/16", "--subnet=192.170.0.0/16",
"--gateway=192.168.0.100", "--gateway=192.170.0.100",
"--ip-range=192.168.1.0/24",
"--aux-address", "a=192.168.1.5", "--aux-address", "b=192.168.1.6",
"--aux-address", "c=192.170.1.5", "--aux-address", "d=192.170.1.6",
"--subnet=192.172.0.0/16", "--subnet=192.173.0.0/16",
"--gateway=192.172.0.100", "--gateway=192.173.0.100",
"--ip-range=192.172.1.0/24",
"--aux-address", "a=192.172.1.5", "--aux-address", "b=192.172.1.6",
"--aux-address", "c=192.173.1.5", "--aux-address", "d=192.173.1.6",
"test7")
assertNwIsAvailable(c, "test7")

Expand Down

0 comments on commit cc1b68d

Please sign in to comment.