Documentation ¶
Index ¶
- Variables
- func DefaultFuzzers(t TestingCommon, codecFactory runtimeserializer.CodecFactory, ...) *fuzz.Fuzzer
- func FuzzerFor(funcs []interface{}, src rand.Source) *fuzz.Fuzzer
- func GenericFuzzerFuncs(t TestingCommon, codecs runtimeserializer.CodecFactory) []interface{}
- func MergeFuzzerFuncs(t TestingCommon, funcLists ...[]interface{}) []interface{}
- func RoundTripProtobufTestForAPIGroup(t *testing.T, installFn InstallFunc, fuzzingFuncs []interface{})
- func RoundTripProtobufTestForScheme(t *testing.T, scheme *runtime.Scheme, fuzzingFuncs []interface{})
- func RoundTripSpecificKind(t *testing.T, gvk schema.GroupVersionKind, scheme *runtime.Scheme, ...)
- func RoundTripSpecificKindWithoutProtobuf(t *testing.T, gvk schema.GroupVersionKind, scheme *runtime.Scheme, ...)
- func RoundTripTestForAPIGroup(t *testing.T, installFn InstallFunc, fuzzingFuncs []interface{})
- func RoundTripTestForScheme(t *testing.T, scheme *runtime.Scheme, fuzzingFuncs []interface{})
- func RoundTripTypes(t *testing.T, scheme *runtime.Scheme, ...)
- func RoundTripTypesWithoutProtobuf(t *testing.T, scheme *runtime.Scheme, ...)
- func TestCodec(codecs runtimeserializer.CodecFactory, gvs ...schema.GroupVersion) runtime.Codec
- func TestStorageCodec(codecs runtimeserializer.CodecFactory, gvs ...schema.GroupVersion) runtime.Codec
- func ValueFuzz(obj interface{})
- type InstallFunc
- type TestingCommon
Constants ¶
This section is empty.
Variables ¶
var FuzzIters = flag.Int("fuzz-iters", 20, "How many fuzzing iterations to do.")
Functions ¶
func DefaultFuzzers ¶
func DefaultFuzzers(t TestingCommon, codecFactory runtimeserializer.CodecFactory, fuzzerFuncs []interface{}) *fuzz.Fuzzer
func GenericFuzzerFuncs ¶
func GenericFuzzerFuncs(t TestingCommon, codecs runtimeserializer.CodecFactory) []interface{}
func MergeFuzzerFuncs ¶
func MergeFuzzerFuncs(t TestingCommon, funcLists ...[]interface{}) []interface{}
MergeFuzzerFuncs will merge the given funcLists, overriding early funcs with later ones if there first argument has the same type.
func RoundTripProtobufTestForAPIGroup ¶
func RoundTripProtobufTestForAPIGroup(t *testing.T, installFn InstallFunc, fuzzingFuncs []interface{})
RoundTripProtobufTestForAPIGroup is convenient to call from your install package to make sure that a "bare" install of your group provides enough information to round trip
func RoundTripProtobufTestForScheme ¶
func RoundTripProtobufTestForScheme(t *testing.T, scheme *runtime.Scheme, fuzzingFuncs []interface{})
RoundTripProtobufTestForScheme is convenient to call if you already have a scheme and want to make sure that its well-formed
func RoundTripSpecificKind ¶
func RoundTripSpecificKind(t *testing.T, gvk schema.GroupVersionKind, scheme *runtime.Scheme, codecFactory runtimeserializer.CodecFactory, fuzzer *fuzz.Fuzzer, nonRoundTrippableTypes map[schema.GroupVersionKind]bool)
func RoundTripSpecificKindWithoutProtobuf ¶
func RoundTripSpecificKindWithoutProtobuf(t *testing.T, gvk schema.GroupVersionKind, scheme *runtime.Scheme, codecFactory runtimeserializer.CodecFactory, fuzzer *fuzz.Fuzzer, nonRoundTrippableTypes map[schema.GroupVersionKind]bool)
func RoundTripTestForAPIGroup ¶
func RoundTripTestForAPIGroup(t *testing.T, installFn InstallFunc, fuzzingFuncs []interface{})
RoundTripTestForAPIGroup is convenient to call from your install package to make sure that a "bare" install of your group provides enough information to round trip
func RoundTripTestForScheme ¶
RoundTripTestForScheme is convenient to call if you already have a scheme and want to make sure that its well-formed
func RoundTripTypes ¶
func RoundTripTypes(t *testing.T, scheme *runtime.Scheme, codecFactory runtimeserializer.CodecFactory, fuzzer *fuzz.Fuzzer, nonRoundTrippableTypes map[schema.GroupVersionKind]bool)
func RoundTripTypesWithoutProtobuf ¶
func RoundTripTypesWithoutProtobuf(t *testing.T, scheme *runtime.Scheme, codecFactory runtimeserializer.CodecFactory, fuzzer *fuzz.Fuzzer, nonRoundTrippableTypes map[schema.GroupVersionKind]bool)
RoundTripTypesWithoutProtobuf applies the round-trip test to all round-trippable Kinds in the scheme. It will skip all the GroupVersionKinds in the skip list.
func TestCodec ¶
func TestCodec(codecs runtimeserializer.CodecFactory, gvs ...schema.GroupVersion) runtime.Codec
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(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme)
type TestingCommon ¶
type TestingCommon interface { Log(args ...interface{}) Logf(format string, args ...interface{}) Error(args ...interface{}) Errorf(format string, args ...interface{}) Fatal(args ...interface{}) Fatalf(format string, args ...interface{}) }
TestingCommon abstracts testing.T and testing.B