Skip to content

Commit

Permalink
chore(tests) skip incompatible tests
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rainest committed Jun 12, 2023
1 parent 0bddb82 commit a125cfd
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/conformance/gateway_conformance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -69,13 +70,16 @@ 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,
GatewayClassName: gatewayClass.Name,
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
Expand All @@ -85,6 +89,14 @@ func TestGatewayConformance(t *testing.T) {
// standard conformance
tests.HTTPRouteHeaderMatching.ShortName,

// https:/Kong/kubernetes-ingress-controller/issues/4166
// requires an 8080 listener, which our manually-built test gateway does not have
tests.HTTPRouteRedirectPortAndScheme.ShortName,

// https:/Kong/kubernetes-ingress-controller/issues/4164
// only 10 and 11 broken, but no way to omit individual cases
tests.HTTPRouteMethodMatching.ShortName,

// extended conformance
// https:/Kong/kubernetes-ingress-controller/issues/3680
tests.GatewayClassObservedGenerationBump.ShortName,
Expand All @@ -98,6 +110,8 @@ func TestGatewayConformance(t *testing.T) {
tests.HTTPRouteRedirectScheme.ShortName,
// https:/Kong/kubernetes-ingress-controller/issues/3683
tests.HTTPRouteResponseHeaderModifier.ShortName,
// https:/Kong/kubernetes-ingress-controller/issues/4165
tests.HTTPRouteRequestMirror.ShortName,

// experimental conformance
// https:/Kong/kubernetes-ingress-controller/issues/3684
Expand All @@ -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)
}

0 comments on commit a125cfd

Please sign in to comment.