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

tests(conformance): enable HTTPRouteResponseHeaderModification #279

Merged
merged 2 commits into from
May 20, 2024
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: 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)
}
Loading