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 5 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.
13 changes: 12 additions & 1 deletion test/kubernetes/e2e/tests/validation_strict_tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,22 @@ import (
)

func ValidationStrictSuiteRunner() e2e.SuiteRunner {
validationSuiteRunner := ValidationStrictSuiteRunnerForExport()
validationSuiteRunner.Register("ValidationSplitWebhook", split_webhook.NewTestingSuite)

return validationSuiteRunner
}

// ValidationStrictSuiteRunnerForExport 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 ValidationStrictSuiteRunnerForExport() e2e.SuiteRunner {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not leave the exported one ValidationStrictSuiteRunner so s-p import doesn't need to change?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and the new one can be ValidationStrictSuiteRunnerNotExported or something?

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