mirror of
https://github.com/moby/moby.git
synced 2026-01-11 10:41:43 +00:00
inte/networking: TestDisableIPv6OnInterface: add '-c1' to ping
If the DNS name still resolves to an IP address, and that address is assigned to a running container, the ping command will run indefinitely and the test suite will time out for 10 mins. This is confusing, as it looks like a daemon hang, or a test suite hang, whereas it's just a test failure. Add '-c1' to ping to make it return immediately. Signed-off-by: Albin Kerouanton <albin.kerouanton@docker.com>
This commit is contained in:
@@ -1092,7 +1092,7 @@ func TestDisableIPv6OnInterface(t *testing.T) {
|
||||
// There should not be an IPv6 DNS or /etc/hosts entry.
|
||||
runRes := container.RunAttach(ctx, t, c,
|
||||
container.WithNetworkMode(tc.netName),
|
||||
container.WithCmd("ping", "-6", ctrName),
|
||||
container.WithCmd("ping", "-6", "-c1", ctrName),
|
||||
)
|
||||
assert.Check(t, is.Equal(runRes.ExitCode, 1))
|
||||
assert.Check(t, is.Contains(runRes.Stderr.String(), "bad address"))
|
||||
|
||||
Reference in New Issue
Block a user