- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for nilChance (0.3 sec)
-
pkg/kubelet/server/stats/summary_test.go
} func getFsStats() *statsapi.FsStats { f := fuzz.New().NilChance(0) v := &statsapi.FsStats{} f.Fuzz(v) return v } func getContainerStats() *statsapi.ContainerStats { f := fuzz.New().NilChance(0) v := &statsapi.ContainerStats{} f.Fuzz(v) return v } func getVolumeCPUAndMemoryStats() *statsapi.ContainerStats { f := fuzz.New().NilChance(0) v := &statsapi.ContainerStats{} f.Fuzz(&v.Name)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 07 08:12:16 UTC 2024 - 15.1K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/controller/openapi/v2/conversion_test.go
invisible := 0 // == 0 means visible, > 0 means invisible depth := 0 maxDepth := 3 nilChance := func(depth int) float64 { return math.Pow(0.9, math.Max(0.0, float64(maxDepth-depth))) } updateFuzzer := func(depth int) { f.NilChance(nilChance(depth)) f.NumElements(0, max(0, maxDepth-depth)) } updateFuzzer(depth)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jun 02 14:34:26 UTC 2023 - 23.2K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/validation_test.go
if c.RandBool() { *vv = &NestedValueValidation{} } }, func(vv *NestedValueValidation, c fuzz.Continue) { if c.RandBool() { *vv = NestedValueValidation{} } }, ) fuzzer.NilChance(0) // check that type must be object typeNames := []string{"object", "array", "number", "integer", "boolean", "string"} for _, typeName := range typeNames { s := Structural{ Generic: Generic{
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri May 31 18:20:00 UTC 2024 - 11.6K bytes - Viewed (0) -
pkg/api/testing/defaulting_test.go
{Group: "flowcontrol.apiserver.k8s.io", Version: "v1", Kind: "PriorityLevelConfigurationList"}: {}, } f := fuzz.New().NilChance(.5).NumElements(1, 1).RandSource(rand.NewSource(1)) f.Funcs( func(s *runtime.RawExtension, c fuzz.Continue) {}, func(s *metav1.LabelSelector, c fuzz.Continue) { c.FuzzNoCustom(s)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 06 00:00:21 UTC 2024 - 20.3K bytes - Viewed (0) -
pkg/kubelet/stats/provider_test.go
InodesUsed: &inodesUsed, } return statsapi.VolumeStats{ FsStats: fsStats, Name: volumeName, } } func generateCustomMetricSpec() []cadvisorapiv1.MetricSpec { f := fuzz.New().NilChance(0).Funcs( func(e *cadvisorapiv1.MetricSpec, c fuzz.Continue) { c.Fuzz(&e.Name) switch c.Intn(3) { case 0: e.Type = cadvisorapiv1.MetricGauge case 1:
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 07 08:12:16 UTC 2024 - 20K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/codec_test.go
} return &schema.GroupVersionKind{Group: gv.Group, Version: gv.Version, Kind: findKind.ObjectKind}, nil } // TestObjectFuzzer can randomly populate all the above objects. var TestObjectFuzzer = fuzz.New().NilChance(.5).NumElements(1, 100).Funcs( func(j *runtimetesting.MyWeirdCustomEmbeddedVersionKindField, c fuzz.Continue) { c.FuzzNoCustom(j) j.APIVersion = "" j.ObjectKind = "" }, )
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 12 15:46:12 UTC 2023 - 13.2K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/test/api_meta_meta_test.go
} func getObjectMetaAndOwnerReferences() (myAPIObject2 MyAPIObject2, metaOwnerReferences []metav1.OwnerReference) { scheme := runtime.NewScheme() codecs := serializer.NewCodecFactory(scheme) fuzz.New().NilChance(.5).NumElements(1, 5).Funcs(metafuzzer.Funcs(codecs)...).MaxDepth(10).Fuzz(&myAPIObject2) references := myAPIObject2.ObjectMeta.OwnerReferences // This is necessary for the test to pass because the getter will return a
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Feb 14 10:11:56 UTC 2022 - 12.9K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/converter_test.go
// with the various validation directives (Ignore, Warn, Strict) func BenchmarkFromUnstructuredWithValidation(b *testing.B) { re := regexp.MustCompile("^I$") f := fuzz.NewWithSeed(1).NilChance(0.1).SkipFieldsWithPattern(re) iObj := &I{} f.Fuzz(&iObj) unstr, err := runtime.DefaultUnstructuredConverter.ToUnstructured(iObj) if err != nil { b.Fatalf("ToUnstructured failed: %v", err) return
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jul 11 16:02:13 UTC 2023 - 22.9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/discovery/aggregated/handler_test.go
} func fuzzAPIGroups(atLeastNumGroups, maxNumGroups int, seed int64) apidiscoveryv2.APIGroupDiscoveryList { fuzzer := fuzz.NewWithSeed(seed) fuzzer.NumElements(atLeastNumGroups, maxNumGroups) fuzzer.NilChance(0) fuzzer.Funcs(func(o *apidiscoveryv2.APIGroupDiscovery, c fuzz.Continue) { c.FuzzNoCustom(o) // The ResourceManager will just not serve the group if its versions // list is empty
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Mar 02 00:29:39 UTC 2024 - 28.6K bytes - Viewed (0)