From 244f35d6c40e9f25770ed21a6c5faaac3cb81b59 Mon Sep 17 00:00:00 2001 From: Yi Tao Date: Wed, 18 Oct 2023 15:44:14 +0800 Subject: [PATCH] remove skipTestForExpressionRouter helper --- test/integration/examples_test.go | 2 -- test/integration/gateway_test.go | 2 -- test/integration/kongingress_test.go | 2 +- test/integration/kongingress_webhook_test.go | 8 ++------ test/integration/skip_helpers_test.go | 9 --------- test/integration/tcpingress_test.go | 5 ----- test/integration/translation_failures_test.go | 1 - 7 files changed, 3 insertions(+), 26 deletions(-) diff --git a/test/integration/examples_test.go b/test/integration/examples_test.go index d2b6269bd1..4632da8d15 100644 --- a/test/integration/examples_test.go +++ b/test/integration/examples_test.go @@ -177,7 +177,6 @@ func TestTCPRouteExample(t *testing.T) { } func TestTLSRouteExample(t *testing.T) { - skipTestForExpressionRouter(t) t.Log("locking Gateway TLS ports") tlsMutex.Lock() t.Cleanup(func() { @@ -279,7 +278,6 @@ func TestIngressExample(t *testing.T) { } func TestUDPIngressExample(t *testing.T) { - skipTestForExpressionRouter(t) t.Log("locking UDP port") udpMutex.Lock() t.Cleanup(func() { diff --git a/test/integration/gateway_test.go b/test/integration/gateway_test.go index b23b0182bf..380676ffd5 100644 --- a/test/integration/gateway_test.go +++ b/test/integration/gateway_test.go @@ -141,7 +141,6 @@ func TestUnmanagedGatewayBasics(t *testing.T) { } func TestGatewayListenerConflicts(t *testing.T) { - skipTestForExpressionRouter(t) ctx := context.Background() var gw *gatewayapi.Gateway @@ -334,7 +333,6 @@ func TestGatewayListenerConflicts(t *testing.T) { } func TestGatewayFilters(t *testing.T) { - skipTestForExpressionRouter(t) ctx := context.Background() ns, cleaner := helpers.Setup(ctx, t, env) diff --git a/test/integration/kongingress_test.go b/test/integration/kongingress_test.go index 5789928204..6f0326d9fd 100644 --- a/test/integration/kongingress_test.go +++ b/test/integration/kongingress_test.go @@ -24,7 +24,7 @@ import ( ) func TestServiceOverrides(t *testing.T) { - skipTestForExpressionRouter(t) + skipTestForRouterFlavors(t, expressions) ctx := context.Background() t.Parallel() diff --git a/test/integration/kongingress_webhook_test.go b/test/integration/kongingress_webhook_test.go index 56b18709e3..5ce62e0f1a 100644 --- a/test/integration/kongingress_webhook_test.go +++ b/test/integration/kongingress_webhook_test.go @@ -6,7 +6,6 @@ import ( "context" "testing" - "github.com/kong/kubernetes-testing-framework/pkg/clusters/types/kind" "github.com/samber/lo" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -21,13 +20,10 @@ import ( ) func TestKongIngressValidationWebhook(t *testing.T) { - skipTestForExpressionRouter(t) + skipTestForNonKindCluster(t) + skipTestForRouterFlavors(t, expressions) ctx := context.Background() - if env.Cluster().Type() != kind.KindClusterType { - t.Skip("webhook tests are only available on KIND clusters currently") - } - ns, _ := helpers.Setup(ctx, t, env) const configResourceName = "kong-validations-kongingress" diff --git a/test/integration/skip_helpers_test.go b/test/integration/skip_helpers_test.go index d09f9bd96f..c4c01c92c0 100644 --- a/test/integration/skip_helpers_test.go +++ b/test/integration/skip_helpers_test.go @@ -26,15 +26,6 @@ func skipTestForRouterFlavors(t *testing.T, flavor ...routerFlavor) { } } -// Expression router is not supported for some objects and features. -// For example, KongIngress is intentionally unsupported. -// TCPRoute is not supported because Kong (< 3.4) does not support expression router on stream proxy. -// When the test case depends on the object or feature not supported, we skip it if expression router is used. -func skipTestForExpressionRouter(t *testing.T) { - t.Helper() - skipTestForRouterFlavors(t, expressions) -} - func skipTestForNonKindCluster(t *testing.T) { t.Helper() if env.Cluster().Type() != kind.KindClusterType { diff --git a/test/integration/tcpingress_test.go b/test/integration/tcpingress_test.go index 2541a85d41..c0d7ecc242 100644 --- a/test/integration/tcpingress_test.go +++ b/test/integration/tcpingress_test.go @@ -303,11 +303,6 @@ func TestTCPIngressTLS(t *testing.T) { func TestTCPIngressTLSPassthrough(t *testing.T) { t.Parallel() - skipTestForExpressionRouter(t) - // TODO https://github.com/Kong/kubernetes-ingress-controller/issues/4540 - // Kong does not currently recognize these requests even though the expression looks correct. This should be enabled - // after determining why the gateway is discarding these requests and applying any necessary fixes. - // RunWhenKongExpressionRouter(t) t.Log("locking Gateway TLS ports") tlsMutex.Lock() diff --git a/test/integration/translation_failures_test.go b/test/integration/translation_failures_test.go index 6e17728aa2..c4c1dec944 100644 --- a/test/integration/translation_failures_test.go +++ b/test/integration/translation_failures_test.go @@ -37,7 +37,6 @@ const testTranslationFailuresObjectsPrefix = "translation-failures-" // TestTranslationFailures ensures that proper warning Kubernetes events are recorded in case of translation failures // encountered. func TestTranslationFailures(t *testing.T) { - skipTestForExpressionRouter(t) ctx := context.Background() type expectedTranslationFailure struct {