From 2c305c33e425cc726b326cab7187fc1b4efa8869 Mon Sep 17 00:00:00 2001 From: Jakub Warczarek Date: Mon, 20 May 2024 23:17:10 +0200 Subject: [PATCH] tests(conformance): enable `HTTPRouteResponseHeaderModification` (#279) --- go.mod | 2 +- test/conformance/conformance_test.go | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 6f2b905e3..9fa2c800a 100644 --- a/go.mod +++ b/go.mod @@ -180,7 +180,7 @@ require ( gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/protobuf v1.33.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/yaml.v2 v2.4.0 + gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.30.0 k8s.io/component-base v0.30.1 // indirect diff --git a/test/conformance/conformance_test.go b/test/conformance/conformance_test.go index 9523b25f6..f14314890 100644 --- a/test/conformance/conformance_test.go +++ b/test/conformance/conformance_test.go @@ -1,7 +1,6 @@ package conformance import ( - "fmt" "path" "testing" @@ -14,6 +13,7 @@ import ( conformancev1 "sigs.k8s.io/gateway-api/conformance/apis/v1" "sigs.k8s.io/gateway-api/conformance/tests" "sigs.k8s.io/gateway-api/conformance/utils/suite" + "sigs.k8s.io/gateway-api/pkg/features" "github.com/kong/gateway-operator/internal/metadata" testutils "github.com/kong/gateway-operator/pkg/utils/test" @@ -55,18 +55,21 @@ func TestGatewayConformance(t *testing.T) { // There are no explicit conformance tests for GatewayClass, but we can // still run the conformance test suite setup to ensure that the // GatewayClass gets accepted. - t.Log("starting the gateway conformance test suite") + t.Log("configuring the Gateway API conformance test suite") const reportFileName = "kong-gateway-operator.yaml" // TODO: https://github.com/Kong/gateway-operator/issues/268 opts := conformance.DefaultOptions(t) opts.ReportOutputPath = "../../" + reportFileName opts.Client = clients.MgrClient opts.GatewayClassName = gwc.Name - opts.BaseManifests = fmt.Sprintf("%s/conformance/base/manifests.yaml", testutils.GatewayRawRepoURL) + opts.BaseManifests = testutils.GatewayRawRepoURL + "/conformance/base/manifests.yaml" opts.SkipTests = skippedTests opts.ConformanceProfiles = sets.New( suite.GatewayHTTPConformanceProfileName, ) + opts.SupportedFeatures = sets.New( + features.SupportHTTPRouteResponseHeaderModification, + ) opts.Implementation = conformancev1.Implementation{ Organization: metadata.Organization, Project: metadata.ProjectName, @@ -77,6 +80,6 @@ func TestGatewayConformance(t *testing.T) { }, } - t.Log("starting the gateway conformance test suite") + t.Log("running the Gateway API conformance test suite") conformance.RunConformanceWithOptions(t, opts) }