Skip to content

Commit

Permalink
tests(conformance): enable HTTPRouteResponseHeaderModification (#279)
Browse files Browse the repository at this point in the history
  • Loading branch information
programmer04 authored May 20, 2024
1 parent d66ac4a commit 2c305c3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 7 additions & 4 deletions test/conformance/conformance_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package conformance

import (
"fmt"
"path"
"testing"

Expand All @@ -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"
Expand Down Expand Up @@ -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,
Expand All @@ -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)
}

0 comments on commit 2c305c3

Please sign in to comment.