Skip to content

Commit

Permalink
Make scheme args ptrs
Browse files Browse the repository at this point in the history
  • Loading branch information
jpbetz committed Dec 17, 2024
1 parent 00237e8 commit 31b3778
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 31b3778

Please sign in to comment.