From a125cfdcc7a1c06997fc424a258e50c850fb37bd Mon Sep 17 00:00:00 2001 From: Travis Raines <571832+rainest@users.noreply.github.com> Date: Mon, 12 Jun 2023 12:28:04 -0700 Subject: [PATCH] chore(tests) skip incompatible tests Skip a conformance test that fails because it requires a non-standard port not exposed by our test Gateway. Skip an unclear rule precedence test. Although the requirement is unclear, it is unlikely that the controller can address this, as precedence is governed by Kong. Skip the HTTP mirroring conformance test. This extended feature is not supported. --- test/conformance/gateway_conformance_test.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/conformance/gateway_conformance_test.go b/test/conformance/gateway_conformance_test.go index ec349f7dd3..ef8b4be24b 100644 --- a/test/conformance/gateway_conformance_test.go +++ b/test/conformance/gateway_conformance_test.go @@ -11,6 +11,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/sets" "sigs.k8s.io/controller-runtime/pkg/client" gatewayv1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2" gatewayv1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1" @@ -69,6 +70,8 @@ func TestGatewayConformance(t *testing.T) { require.NoError(t, client.Create(ctx, gatewayClass)) t.Cleanup(func() { assert.NoError(t, client.Delete(ctx, gatewayClass)) }) + exemptFeatures := sets.New(suite.SupportMesh) + t.Log("starting the gateway conformance test suite") cSuite := suite.New(suite.Options{ Client: client, @@ -76,6 +79,7 @@ func TestGatewayConformance(t *testing.T) { Debug: showDebug, CleanupBaseResources: shouldCleanup, EnableAllSupportedFeatures: enableAllSupportedFeatures, + ExemptFeatures: exemptFeatures, BaseManifests: conformanceTestsBaseManifests, SkipTests: []string{ // this test is currently fixed but cannot be re-enabled yet due to an upstream issue @@ -85,6 +89,14 @@ func TestGatewayConformance(t *testing.T) { // standard conformance tests.HTTPRouteHeaderMatching.ShortName, + // https://github.com/Kong/kubernetes-ingress-controller/issues/4166 + // requires an 8080 listener, which our manually-built test gateway does not have + tests.HTTPRouteRedirectPortAndScheme.ShortName, + + // https://github.com/Kong/kubernetes-ingress-controller/issues/4164 + // only 10 and 11 broken, but no way to omit individual cases + tests.HTTPRouteMethodMatching.ShortName, + // extended conformance // https://github.com/Kong/kubernetes-ingress-controller/issues/3680 tests.GatewayClassObservedGenerationBump.ShortName, @@ -98,6 +110,8 @@ func TestGatewayConformance(t *testing.T) { tests.HTTPRouteRedirectScheme.ShortName, // https://github.com/Kong/kubernetes-ingress-controller/issues/3683 tests.HTTPRouteResponseHeaderModifier.ShortName, + // https://github.com/Kong/kubernetes-ingress-controller/issues/4165 + tests.HTTPRouteRequestMirror.ShortName, // experimental conformance // https://github.com/Kong/kubernetes-ingress-controller/issues/3684 @@ -109,5 +123,9 @@ func TestGatewayConformance(t *testing.T) { }, }) cSuite.Setup(t) + // To work with individual tests only, you can disable the normal Run call and construct a slice containing a + // single test only, e.g.: + // + //cSuite.Run(t, []suite.ConformanceTest{tests.HTTPRouteRedirectPortAndScheme}) cSuite.Run(t, tests.ConformanceTests) }