1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #20995 from wenchma/ping_timeout

Update ping command timeout to 4 sec
This commit is contained in:
Brian Goff 2016-03-08 15:35:00 -05:00
commit 6d6919ed79

View file

@ -1430,8 +1430,9 @@ func (s *DockerSuite) 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 := dockerCmdWithTimeout(time.Second, "exec", "first", "ping", "-c", "1", "www.google.com")
out, _, err := dockerCmdWithError("exec", "first", "ping", "-W", "4", "-c", "1", "www.google.com")
c.Assert(err, check.NotNil)
c.Assert(out, checker.Contains, "100% packet loss")
_, _, err = dockerCmdWithError("exec", "second", "ping", "-c", "1", "first")
c.Assert(err, check.IsNil)
}