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

Don't export ValidationSplitWebhook test #10394

Merged
merged 7 commits into from
Nov 23, 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
8 changes: 8 additions & 0 deletions changelog/v1.18.0-rc2/dont-export-split-validation-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
changelog:
- type: NON_USER_FACING
issueLink: https://github.com/solo-io/solo-projects/issues/7256
resolvesIssue: false
description: >-
Create a new SuiteRunner for the ValidationTests which does not include the split validation test, which
fails when imported by other projects. https://github.com/k8sgateway/k8sgateway/issues/10374 created to
track a fix that will allow tests that update Helm values to be exported.
2 changes: 1 addition & 1 deletion test/kubernetes/e2e/tests/validation_strict_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ func TestValidationStrict(t *testing.T) {
// Install Gloo Gateway with correct validation settings
testInstallation.InstallGlooGatewayWithTestHelper(ctx, testHelper, 5*time.Minute)

ValidationStrictSuiteRunner().Run(ctx, t, testInstallation)
ValidationStrictSuiteRunnerAll().Run(ctx, t, testInstallation)
}
15 changes: 14 additions & 1 deletion test/kubernetes/e2e/tests/validation_strict_tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,25 @@ import (
"github.com/solo-io/gloo/test/kubernetes/e2e/features/validation/validation_strict_warnings"
)

// ValidationStrictSuiteRunnerAll is used to run all the validation tests, including ones that depend on the helm chart/values/helpers
// This is the function that should be used to run the validation tests in this repo
func ValidationStrictSuiteRunnerAll() e2e.SuiteRunner {
validationSuiteRunner := ValidationStrictSuiteRunner()
validationSuiteRunner.Register("ValidationSplitWebhook", split_webhook.NewTestingSuite)

return validationSuiteRunner
}

// ValidationStrictSuiteRunner is used to export the validation tests that can be run when the project is imported as a helm dependency
// The "ValidationSplitWebhook" test has logic that depends on the helm chart/values/helpers
// that are not valid when the project is imported as a helm dependency
// https://github.com/k8sgateway/k8sgateway/issues/10374 has been created to create a fix for this.
// If more tests are added that depend on the helm chart/values/helpers, the above issue should be resolved instead of using this approach
func ValidationStrictSuiteRunner() e2e.SuiteRunner {
validationSuiteRunner := e2e.NewSuiteRunner(false)

validationSuiteRunner.Register("ValidationStrictWarnings", validation_strict_warnings.NewTestingSuite)
validationSuiteRunner.Register("ValidationRejectInvalid", validation_reject_invalid.NewTestingSuite)
validationSuiteRunner.Register("ValidationSplitWebhook", split_webhook.NewTestingSuite)

return validationSuiteRunner
}
Loading