Documentation ¶
Index ¶
- Variables
- 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 RoundTripSpecificKind(t *testing.T, internalGVK schema.GroupVersionKind, scheme *runtime.Scheme, ...)
- func RoundTripSpecificKindWithoutProtobuf(t *testing.T, internalGVK schema.GroupVersionKind, scheme *runtime.Scheme, ...)
- 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
- type TestingCommon
Constants ¶
This section is empty.
Variables ¶
View Source
var FuzzIters = flag.Int("fuzz-iters", 20, "How many fuzzing iterations to do.")
Functions ¶
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 RoundTripSpecificKind ¶
func RoundTripSpecificKind(t *testing.T, internalGVK schema.GroupVersionKind, scheme *runtime.Scheme, codecFactory runtimeserializer.CodecFactory, fuzzer *fuzz.Fuzzer, nonRoundTrippableTypes map[schema.GroupVersionKind]bool)
func RoundTripSpecificKindWithoutProtobuf ¶
func RoundTripSpecificKindWithoutProtobuf(t *testing.T, internalGVK schema.GroupVersionKind, scheme *runtime.Scheme, codecFactory runtimeserializer.CodecFactory, fuzzer *fuzz.Fuzzer, nonRoundTrippableTypes map[schema.GroupVersionKind]bool)
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)
RoundTripTypes 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 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
Click to show internal directories.
Click to hide internal directories.