apimachineryk8s.io/apimachinery/pkg/api/apitesting Index | Files | Directories

package apitesting

import "k8s.io/apimachinery/pkg/api/apitesting"

Index

Functions

func SchemeForInstallOrDie

func SchemeForInstallOrDie(installFns ...InstallOrDieFunc) (*runtime.Scheme, runtimeserializer.CodecFactory)

SchemeForInstallOrDie builds a simple test scheme and codecfactory pair for easy unit testing from higher level install methods

func SchemeForOrDie

func SchemeForOrDie(installFns ...InstallFunc) (*runtime.Scheme, runtimeserializer.CodecFactory)

SchemeForOrDie builds a simple test scheme and codecfactory pair for easy unit testing from the bare registration methods.

func TestCodec

TestCodec returns the codec for the API version to test against, as set by the KUBE_TEST_API_TYPE env var.

func TestStorageCodec

func TestStorageCodec(codecs runtimeserializer.CodecFactory, gvs ...schema.GroupVersion) runtime.Codec

TestStorageCodec returns the codec for the API version to test against used in storage, as set by the KUBE_TEST_API_STORAGE_TYPE env var.

Types

type InstallFunc

type InstallFunc func(scheme *runtime.Scheme) error

InstallFunc mirrors install functions that can return an error

type InstallOrDieFunc

type InstallOrDieFunc func(scheme *runtime.Scheme)

InstallOrDieFunc mirrors install functions that require success

Source Files

codec.go

Directories

PathSynopsis
pkg/api/apitesting/fuzzer
pkg/api/apitesting/naming
pkg/api/apitesting/roundtrip
Version
v0.33.0 (latest)
Published
Apr 11, 2025
Platform
linux/amd64
Imports
7 packages
Last checked
12 hours ago

Tools for package owners.