mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Enhancement of TestDockerNetworkInternalMode
Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
This commit is contained in:
parent
0eb20be13c
commit
312e20bf6c
1 changed files with 2 additions and 2 deletions
|
@ -1407,7 +1407,7 @@ func (s *DockerSuite) TestDockerNetworkConnectFailsNoInspectChange(c *check.C) {
|
|||
c.Assert(ns1, check.Equals, ns0)
|
||||
}
|
||||
|
||||
func (s *DockerNetworkSuite) TestDockerNetworkInternalMode(c *check.C) {
|
||||
func (s *DockerSuite) TestDockerNetworkInternalMode(c *check.C) {
|
||||
dockerCmd(c, "network", "create", "--driver=bridge", "--internal", "internal")
|
||||
assertNwIsAvailable(c, "internal")
|
||||
nr := getNetworkResource(c, "internal")
|
||||
|
@ -1417,7 +1417,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkInternalMode(c *check.C) {
|
|||
c.Assert(waitRun("first"), check.IsNil)
|
||||
dockerCmd(c, "run", "-d", "--net=internal", "--name=second", "busybox", "top")
|
||||
c.Assert(waitRun("second"), check.IsNil)
|
||||
_, _, err := dockerCmdWithError("exec", "first", "ping", "-c", "1", "www.google.com")
|
||||
_, _, err := dockerCmdWithTimeout(time.Second, "exec", "first", "ping", "-c", "1", "www.google.com")
|
||||
c.Assert(err, check.NotNil)
|
||||
_, _, err = dockerCmdWithError("exec", "second", "ping", "-c", "1", "first")
|
||||
c.Assert(err, check.IsNil)
|
||||
|
|
Loading…
Reference in a new issue