From 31b377880e8f1157f31ac8e4f107dfbd2edfdb3f Mon Sep 17 00:00:00 2001 From: Joe Betz Date: Tue, 17 Dec 2024 18:51:40 -0500 Subject: [PATCH] Make scheme args ptrs --- .../apimachinery/pkg/runtime/testing/validation.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/staging/src/k8s.io/apimachinery/pkg/runtime/testing/validation.go b/staging/src/k8s.io/apimachinery/pkg/runtime/testing/validation.go index 1a675b0ca79c2..a5ecb944a9115 100644 --- a/staging/src/k8s.io/apimachinery/pkg/runtime/testing/validation.go +++ b/staging/src/k8s.io/apimachinery/pkg/runtime/testing/validation.go @@ -37,21 +37,21 @@ type VersionValidationRunner func(t *testing.T, versionValidationErrors field.Er // errs = append(errs, versionValidationErrors...) // generated declarative validation // // Validate that the errors are what was expected for this test case. // }) -func RunValidationForEachVersion(t *testing.T, scheme runtime.Scheme, options sets.Set[string], unversioned runtime.Object, fn VersionValidationRunner) { +func RunValidationForEachVersion(t *testing.T, scheme *runtime.Scheme, options sets.Set[string], unversioned runtime.Object, fn VersionValidationRunner) { runValidation(t, scheme, options, unversioned, fn) } // RunUpdateValidationForEachVersion is like RunValidationForEachVersion but for update validation. -func RunUpdateValidationForEachVersion(t *testing.T, scheme runtime.Scheme, options sets.Set[string], unversioned, unversionedOld runtime.Object, fn VersionValidationRunner) { +func RunUpdateValidationForEachVersion(t *testing.T, scheme *runtime.Scheme, options sets.Set[string], unversioned, unversionedOld runtime.Object, fn VersionValidationRunner) { runUpdateValidation(t, scheme, options, unversioned, unversionedOld, fn) } // RunStatusValidationForEachVersion is like RunUpdateValidationForEachVersion but for status validation. -func RunStatusValidationForEachVersion(t *testing.T, scheme runtime.Scheme, options sets.Set[string], unversioned, unversionedOld runtime.Object, fn VersionValidationRunner) { +func RunStatusValidationForEachVersion(t *testing.T, scheme *runtime.Scheme, options sets.Set[string], unversioned, unversionedOld runtime.Object, fn VersionValidationRunner) { runUpdateValidation(t, scheme, options, unversioned, unversionedOld, fn, "status") } -func runValidation(t *testing.T, scheme runtime.Scheme, options sets.Set[string], unversioned runtime.Object, fn VersionValidationRunner, subresources ...string) { +func runValidation(t *testing.T, scheme *runtime.Scheme, options sets.Set[string], unversioned runtime.Object, fn VersionValidationRunner, subresources ...string) { unversionedGVKs, _, err := scheme.ObjectKinds(unversioned) if err != nil { t.Fatal(err) @@ -77,7 +77,7 @@ func runValidation(t *testing.T, scheme runtime.Scheme, options sets.Set[string] } } -func runUpdateValidation(t *testing.T, scheme runtime.Scheme, options sets.Set[string], unversionedNew, unversionedOld runtime.Object, fn VersionValidationRunner, subresources ...string) { +func runUpdateValidation(t *testing.T, scheme *runtime.Scheme, options sets.Set[string], unversionedNew, unversionedOld runtime.Object, fn VersionValidationRunner, subresources ...string) { unversionedGVKs, _, err := scheme.ObjectKinds(unversionedNew) if err != nil { t.Fatal(err)