From 0fadaa25c5d6d382231656ec67ea3b677f88b8e6 Mon Sep 17 00:00:00 2001 From: Steve Kriss Date: Tue, 7 Feb 2023 17:30:14 -0700 Subject: [PATCH] add additional unit test case for #1703 Signed-off-by: Steve Kriss --- conformance/utils/kubernetes/helpers_test.go | 25 ++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/conformance/utils/kubernetes/helpers_test.go b/conformance/utils/kubernetes/helpers_test.go index dc7812b265..d96741f047 100644 --- a/conformance/utils/kubernetes/helpers_test.go +++ b/conformance/utils/kubernetes/helpers_test.go @@ -20,6 +20,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "k8s.io/utils/pointer" "sigs.k8s.io/gateway-api/apis/v1alpha2" "sigs.k8s.io/gateway-api/apis/v1beta1" @@ -75,6 +76,30 @@ func Test_listenersMatch(t *testing.T) { }, want: true, }, + { + name: "SupportedKinds: expected and actual are equal values, Group pointers are different", + expected: []v1beta1.ListenerStatus{ + { + SupportedKinds: []v1beta1.RouteGroupKind{ + { + Group: (*v1beta1.Group)(&v1beta1.GroupVersion.Group), + Kind: v1beta1.Kind("HTTPRoute"), + }, + }, + }, + }, + actual: []v1beta1.ListenerStatus{ + { + SupportedKinds: []v1beta1.RouteGroupKind{ + { + Group: (*v1beta1.Group)(pointer.String("gateway.networking.k8s.io")), + Kind: v1beta1.Kind("HTTPRoute"), + }, + }, + }, + }, + want: true, + }, { name: "SupportedKinds: expected kind not found in actual", expected: []v1beta1.ListenerStatus{