diff --git a/conformance/utils/kubernetes/helpers.go b/conformance/utils/kubernetes/helpers.go index d5446506e6..a0926f9db5 100644 --- a/conformance/utils/kubernetes/helpers.go +++ b/conformance/utils/kubernetes/helpers.go @@ -32,7 +32,6 @@ import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" "sigs.k8s.io/controller-runtime/pkg/client" @@ -636,12 +635,20 @@ func listenersMatch(t *testing.T, expected, actual []v1beta1.ListenerStatus) boo // Ensure that the expected Listener.SupportedKinds items are present in actual Listener.SupportedKinds // Find the items instead of performing an exact match of the slice because the implementation // might support more Kinds than defined in the test - eSupportedKindsSet := sets.New(eListener.SupportedKinds...) - aSupportedKindsSet := sets.New(aListener.SupportedKinds...) - if !aSupportedKindsSet.IsSuperset(eSupportedKindsSet) { - t.Logf("Expected %v kinds to be present in SupportedKinds", eSupportedKindsSet.Difference(aSupportedKindsSet)) - return false + for _, eKind := range eListener.SupportedKinds { + found := false + for _, aKind := range aListener.SupportedKinds { + if *eKind.Group == *aKind.Group && eKind.Kind == aKind.Kind { + found = true + break + } + } + if !found { + t.Logf("Expected Group:%s Kind:%s to be present in SupportedKinds", *eKind.Group, eKind.Kind) + return false + } } + if aListener.AttachedRoutes != eListener.AttachedRoutes { t.Logf("Expected AttachedRoutes to be %v, got %v", eListener.AttachedRoutes, aListener.AttachedRoutes) return false