Skip to content

Commit

Permalink
chore(tests) check new default Gateway condition
Browse files Browse the repository at this point in the history
  • Loading branch information
rainest committed Jun 13, 2023
1 parent b29b075 commit 4cc97eb
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions test/integration/gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,10 +385,8 @@ func TestUnmanagedGatewayControllerSupport(t *testing.T) {
for timeout.After(time.Now()) {
unsupportedGateway, err = gatewayClient.GatewayV1beta1().Gateways(ns.Name).Get(ctx, unsupportedGateway.Name, metav1.GetOptions{})
require.NoError(t, err)
require.Len(t, unsupportedGateway.Status.Conditions, 1)
//lint:ignore SA1019 the default upstream reason is still NotReconciled https:/kubernetes-sigs/gateway-api/pull/1701
//nolint:staticcheck
require.Equal(t, string(gatewayv1beta1.GatewayReasonNotReconciled), unsupportedGateway.Status.Conditions[0].Reason)
require.Len(t, unsupportedGateway.Status.Conditions, 2)
require.Equal(t, string(gatewayv1beta1.GatewayReasonPending), unsupportedGateway.Status.Conditions[0].Reason)
}
}

Expand All @@ -415,10 +413,8 @@ func TestUnmanagedGatewayClass(t *testing.T) {
for timeout.After(time.Now()) {
gateway, err = gatewayClient.GatewayV1beta1().Gateways(ns.Name).Get(ctx, gateway.Name, metav1.GetOptions{})
require.NoError(t, err)
require.Len(t, gateway.Status.Conditions, 1)
//lint:ignore SA1019 the default upstream reason is still NotReconciled https:/kubernetes-sigs/gateway-api/pull/1701
//nolint:staticcheck
require.Equal(t, string(gatewayv1beta1.GatewayReasonNotReconciled), gateway.Status.Conditions[0].Reason)
require.Len(t, gateway.Status.Conditions, 2)
require.Equal(t, string(gatewayv1beta1.GatewayReasonPending), gateway.Status.Conditions[0].Reason)
}

t.Log("deploying the missing gatewayclass to the test cluster")
Expand Down Expand Up @@ -462,10 +458,8 @@ func TestManagedGatewayClass(t *testing.T) {
for timeout.After(time.Now()) {
gateway, err = gatewayClient.GatewayV1beta1().Gateways(ns.Name).Get(ctx, gateway.Name, metav1.GetOptions{})
require.NoError(t, err)
require.Len(t, gateway.Status.Conditions, 1)
//lint:ignore SA1019 the default upstream reason is still NotReconciled https:/kubernetes-sigs/gateway-api/pull/1701
//nolint:staticcheck
require.Equal(t, string(gatewayv1beta1.GatewayReasonNotReconciled), gateway.Status.Conditions[0].Reason)
require.Len(t, gateway.Status.Conditions, 2)
require.Equal(t, string(gatewayv1beta1.GatewayReasonPending), gateway.Status.Conditions[0].Reason)
}

t.Log("deploying a missing managed gatewayclass to the test cluster")
Expand Down

0 comments on commit 4cc97eb

Please sign in to comment.