kubernetesk8s.io/kubernetes/pkg/api/testing/compat Index | Files

package compat

import "k8s.io/kubernetes/pkg/api/testing/compat"

Index

Functions

func TestCompatibility

func TestCompatibility(
	t *testing.T,
	version schema.GroupVersion,
	input []byte,
	validator func(obj runtime.Object) field.ErrorList,
	expectedKeys map[string]string,
	absentKeys []string,
)

TestCompatibility reencodes the input using the codec for the given version and checks for the presence of the expected keys and absent keys in the resulting JSON. Based on: https://github.com/openshift/origin/blob/master/pkg/api/compatibility_test.go

Source Files

compatibility_tester.go

Version
v1.33.0 (latest)
Published
Apr 23, 2025
Platform
linux/amd64
Imports
11 packages
Last checked
3 hours ago

Tools for package owners.