diff options
author | Adin Scannell <ascannell@google.com> | 2020-11-23 14:16:20 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-11-23 14:24:27 -0800 |
commit | 2320ce5b7d992973182a90b2885e852b2059ee08 (patch) | |
tree | e4ccaf9499549bf0e4b831636aff8474c505dbc0 /test | |
parent | b6c00520d314811d59485a42c2fba578f34b91ee (diff) |
Fail gracefully if Docker is not configured with ipv6.
PiperOrigin-RevId: 343927315
Diffstat (limited to 'test')
-rw-r--r-- | test/iptables/iptables_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/iptables/iptables_test.go b/test/iptables/iptables_test.go index 834f7615f..4733146c0 100644 --- a/test/iptables/iptables_test.go +++ b/test/iptables/iptables_test.go @@ -89,6 +89,10 @@ func iptablesTest(t *testing.T, test TestCase, ipv6 bool) { // Get the container IP. ip, err := d.FindIP(ctx, ipv6) if err != nil { + // If ipv6 is not configured, don't fail. + if ipv6 && err == dockerutil.ErrNoIP { + t.Skipf("No ipv6 address is available.") + } t.Fatalf("failed to get container IP: %v", err) } |