testing

package
v0.12.1-0...-0a124f2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2017 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FuzzIters = flag.Int("fuzz-iters", 20, "How many fuzzing iterations to do.")

Functions

func FuzzerFor

func FuzzerFor(funcs []interface{}, src rand.Source) *fuzz.Fuzzer

FuzzerFor can randomly populate api objects that are destined for version.

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL