Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(integration): remove skipTestForExpressionRouter helper in tests #4881

Merged
merged 1 commit into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions test/integration/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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() {
Expand Down
2 changes: 0 additions & 2 deletions test/integration/gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ func TestUnmanagedGatewayBasics(t *testing.T) {
}

func TestGatewayListenerConflicts(t *testing.T) {
skipTestForExpressionRouter(t)
ctx := context.Background()

var gw *gatewayapi.Gateway
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/integration/kongingress_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
)

func TestServiceOverrides(t *testing.T) {
skipTestForExpressionRouter(t)
skipTestForRouterFlavors(t, expressions)
ctx := context.Background()

t.Parallel()
Expand Down
8 changes: 2 additions & 6 deletions test/integration/kongingress_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
9 changes: 0 additions & 9 deletions test/integration/skip_helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 0 additions & 5 deletions test/integration/tcpingress_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 0 additions & 1 deletion test/integration/translation_failures_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down