diff --git a/cmd/http/listener_test.go b/cmd/http/listener_test.go index c8a559249..037ad8c6d 100644 --- a/cmd/http/listener_test.go +++ b/cmd/http/listener_test.go @@ -186,6 +186,10 @@ func TestHTTPListenerStartClose(t *testing.T) { testCase.serverAddrs, ) if err != nil { + if strings.Contains(err.Error(), "The requested address is not valid in its context") { + // Ignore if IP is unbindable. + continue + } t.Fatalf("Test %d: error: expected = , got = %v", i+1, err) } @@ -225,6 +229,10 @@ func TestHTTPListenerAddr(t *testing.T) { testCase.serverAddrs, ) if err != nil { + if strings.Contains(err.Error(), "The requested address is not valid in its context") { + // Ignore if IP is unbindable. + continue + } t.Fatalf("Test %d: error: expected = , got = %v", i+1, err) } @@ -261,6 +269,10 @@ func TestHTTPListenerAddrs(t *testing.T) { testCase.serverAddrs, ) if err != nil { + if strings.Contains(err.Error(), "The requested address is not valid in its context") { + // Ignore if IP is unbindable. + continue + } t.Fatalf("Test %d: error: expected = , got = %v", i+1, err) }