Skip to content

Commit

Permalink
Don't export ValidationSplitWebhook test (#10394)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheidkamp authored Nov 23, 2024
1 parent 0f99be1 commit aac1d58
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
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
}

0 comments on commit aac1d58

Please sign in to comment.