mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Add integ-test for fixed--cidr == bridge network
Signed-off-by: Alessandro Boch <aboch@docker.com>
This commit is contained in:
parent
793b20ba09
commit
5b53839326
1 changed files with 20 additions and 0 deletions
|
@ -794,6 +794,26 @@ func (s *DockerDaemonSuite) TestDaemonBridgeFixedCidr(c *check.C) {
|
|||
}
|
||||
}
|
||||
|
||||
func (s *DockerDaemonSuite) TestDaemonBridgeFixedCidrFixedCIDREqualBridgeNetwork(c *check.C) {
|
||||
d := s.d
|
||||
|
||||
bridgeName := "external-bridge"
|
||||
bridgeIP := "172.27.42.1/16"
|
||||
|
||||
out, err := createInterface(c, "bridge", bridgeName, bridgeIP)
|
||||
c.Assert(err, check.IsNil, check.Commentf(out))
|
||||
defer deleteInterface(c, bridgeName)
|
||||
|
||||
err = d.StartWithBusybox("--bridge", bridgeName, "--fixed-cidr", bridgeIP)
|
||||
c.Assert(err, check.IsNil)
|
||||
defer s.d.Restart()
|
||||
|
||||
out, err = d.Cmd("run", "-d", "busybox", "top")
|
||||
c.Assert(err, check.IsNil, check.Commentf(out))
|
||||
cid1 := strings.TrimSpace(out)
|
||||
defer d.Cmd("stop", cid1)
|
||||
}
|
||||
|
||||
func (s *DockerDaemonSuite) TestDaemonDefaultGatewayIPv4Implicit(c *check.C) {
|
||||
defaultNetworkBridge := "docker0"
|
||||
deleteInterface(c, defaultNetworkBridge)
|
||||
|
|
Loading…
Reference in a new issue