diff --git a/cmd/net_test.go b/cmd/net_test.go index 594cdb624..f3e1be578 100644 --- a/cmd/net_test.go +++ b/cmd/net_test.go @@ -147,8 +147,16 @@ func TestGetHostIP(t *testing.T) { t.Fatalf("error: expected = %v, got = %v", testCase.expectedErr, err) } - if testCase.expectedIPList != nil && testCase.expectedIPList.Intersection(ipList).IsEmpty() { - t.Fatalf("host: expected = %v, got = %v", testCase.expectedIPList, ipList) + if testCase.expectedIPList != nil { + var found bool + for _, ip := range ipList.ToSlice() { + if testCase.expectedIPList.Contains(ip) { + found = true + } + } + if !found { + t.Fatalf("host: expected = %v, got = %v", testCase.expectedIPList, ipList) + } } } }