Instead of waiting for the DNS to fail, try to access
a specific external IP and verify that 100% of the pakcets
are being lost.
Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
| ... | ... |
@@ -1644,9 +1644,9 @@ func (s *DockerSuite) TestDockerNetworkInternalMode(c *check.C) {
|
| 1644 | 1644 |
c.Assert(waitRun("first"), check.IsNil)
|
| 1645 | 1645 |
dockerCmd(c, "run", "-d", "--net=internal", "--name=second", "busybox:glibc", "top") |
| 1646 | 1646 |
c.Assert(waitRun("second"), check.IsNil)
|
| 1647 |
- out, _, err := dockerCmdWithError("exec", "first", "ping", "-W", "4", "-c", "1", "www.google.com")
|
|
| 1647 |
+ out, _, err := dockerCmdWithError("exec", "first", "ping", "-W", "4", "-c", "1", "8.8.8.8")
|
|
| 1648 | 1648 |
c.Assert(err, check.NotNil) |
| 1649 |
- c.Assert(out, checker.Contains, "ping: bad address") |
|
| 1649 |
+ c.Assert(out, checker.Contains, "100% packet loss") |
|
| 1650 | 1650 |
_, _, err = dockerCmdWithError("exec", "second", "ping", "-c", "1", "first")
|
| 1651 | 1651 |
c.Assert(err, check.IsNil) |
| 1652 | 1652 |
} |