mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-06 13:41:36 +00:00
Merge pull request #14294 from mavenugo/bnone
fixed incorrect assumption on --bridge=none treated as disable network
This commit is contained in:
@@ -1324,7 +1324,17 @@ func (s *DockerDaemonSuite) TestRunContainerWithBridgeNone(c *check.C) {
|
||||
out, err := s.d.Cmd("run", "--rm", "busybox", "ip", "l")
|
||||
c.Assert(err, check.IsNil, check.Commentf("Output: %s", out))
|
||||
c.Assert(strings.Contains(out, "eth0"), check.Equals, false,
|
||||
check.Commentf("There shouldn't be eth0 in container when network is disabled: %s", out))
|
||||
check.Commentf("There shouldn't be eth0 in container in default(bridge) mode when bridge network is disabled: %s", out))
|
||||
|
||||
out, err = s.d.Cmd("run", "--rm", "--net=bridge", "busybox", "ip", "l")
|
||||
c.Assert(err, check.IsNil, check.Commentf("Output: %s", out))
|
||||
c.Assert(strings.Contains(out, "eth0"), check.Equals, false,
|
||||
check.Commentf("There shouldn't be eth0 in container in bridge mode when bridge network is disabled: %s", out))
|
||||
|
||||
out, err = s.d.Cmd("run", "--rm", "--net=host", "busybox", "ip", "l")
|
||||
c.Assert(err, check.IsNil, check.Commentf("Output: %s", out))
|
||||
c.Assert(strings.Contains(out, "eth0"), check.Equals, true,
|
||||
check.Commentf("There should be eth0 in container when --net=host when bridge network is disabled: %s", out))
|
||||
}
|
||||
|
||||
func (s *DockerDaemonSuite) TestDaemonRestartWithContainerRunning(t *check.C) {
|
||||
|
||||
Reference in New Issue
Block a user