diff --git a/changelog/v1.18.0-rc2/dont-export-split-validation-test.yaml b/changelog/v1.18.0-rc2/dont-export-split-validation-test.yaml new file mode 100644 index 00000000000..d9f5e64715f --- /dev/null +++ b/changelog/v1.18.0-rc2/dont-export-split-validation-test.yaml @@ -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. diff --git a/test/kubernetes/e2e/tests/validation_strict_test.go b/test/kubernetes/e2e/tests/validation_strict_test.go index 975893c9f09..97d95f8b783 100644 --- a/test/kubernetes/e2e/tests/validation_strict_test.go +++ b/test/kubernetes/e2e/tests/validation_strict_test.go @@ -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) } diff --git a/test/kubernetes/e2e/tests/validation_strict_tests.go b/test/kubernetes/e2e/tests/validation_strict_tests.go index f9b8f846f10..63bcb005674 100644 --- a/test/kubernetes/e2e/tests/validation_strict_tests.go +++ b/test/kubernetes/e2e/tests/validation_strict_tests.go @@ -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 }