Skip to content

Commit

Permalink
add additional unit test case for kubernetes-sigs#1703
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Kriss <krisss@vmware.com>
  • Loading branch information
skriss committed Feb 8, 2023
1 parent 1d55ce5 commit 0fadaa2
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions conformance/utils/kubernetes/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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{
Expand Down

0 comments on commit 0fadaa2

Please sign in to comment.