Browse Source

Test for two containers in --net=host

This is test for regression which was encountered during libnetwork
merging.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Alexander Morozov 10 years ago
parent
commit
7e5902c92d
1 changed files with 7 additions and 0 deletions
  1. 7 0
      integration-cli/docker_cli_run_test.go

+ 7 - 0
integration-cli/docker_cli_run_test.go

@@ -3178,3 +3178,10 @@ func (s *DockerSuite) TestMountIntoSys(c *check.C) {
 		c.Fatal("container should be able to mount into /sys/fs/cgroup")
 	}
 }
+
+func (s *DockerSuite) TestTwoContainersInNetHost(c *check.C) {
+	dockerCmd(c, "run", "-d", "--net=host", "--name=first", "busybox", "top")
+	dockerCmd(c, "run", "-d", "--net=host", "--name=second", "busybox", "top")
+	dockerCmd(c, "stop", "first")
+	dockerCmd(c, "stop", "second")
+}