- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 20 for nilChance (0.15 sec)
-
staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/helpers_test.go
} } } func TestResetObjectMetaForStatus(t *testing.T) { meta := &ObjectMeta{} existingMeta := &ObjectMeta{} // fuzz the existingMeta to set every field, no nils f := fuzz.New().NilChance(0).NumElements(1, 1).MaxDepth(10) f.Fuzz(existingMeta) ResetObjectMetaForStatus(meta, existingMeta) // not all fields are stomped during the reset. These fields should not have been set. False
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 12 15:46:12 UTC 2023 - 7.1K 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/test/api_meta_help_test.go
} } } func TestSetExtractListRoundTrip(t *testing.T) { scheme := runtime.NewScheme() codecs := serializer.NewCodecFactory(scheme) fuzzer := fuzz.New().NilChance(0).NumElements(1, 5).Funcs(metafuzzer.Funcs(codecs)...).MaxDepth(10) for i := 0; i < 5; i++ { start := &testapigroup.CarpList{} fuzzer.Fuzz(&start.Items) list, err := meta.ExtractList(start)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 12 15:46:12 UTC 2023 - 8.5K 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) -
pilot/pkg/model/virtualservice_test.go
} }) } } // Note: this is to prevent missing merge new added HTTPRoute fields func TestFuzzMergeHttpRoute(t *testing.T) { f := fuzz.New().NilChance(0.5).NumElements(0, 1).Funcs( func(r *networking.HTTPRoute, c fuzz.Continue) { c.FuzzNoCustom(r) r.Match = []*networking.HTTPMatchRequest{{}} r.Route = nil r.Redirect = nil r.Delegate = nil
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Sun Apr 21 17:42:54 UTC 2024 - 60.6K 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) -
staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store_test.go
if err == nil || !errors.IsAlreadyExists(err) { t.Error("Expected already exists error") } } func TestNewCreateOptionsFromUpdateOptions(t *testing.T) { f := fuzz.New().NilChance(0.0).NumElements(1, 1) // The goal here is to trigger when any changes are made to either // CreateOptions or UpdateOptions types, so we can update the converter. for i := 0; i < 20; i++ {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 12 10:12:02 UTC 2024 - 101.8K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/validation_test.go
seed := int64(5577006791947779410) f := fuzzer.FuzzerFor(fuzzerFuncs, rand.NewSource(seed), codecs) // fuzz internal types schema := &apiextensions.JSONSchemaProps{} f.NilChance(0).NumElements(10, 10).MaxDepth(10).Fuzz(schema) b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { if SchemaHas(schema, func(_ *apiextensions.JSONSchemaProps) bool { return false
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri May 10 22:07:40 UTC 2024 - 349.4K bytes - Viewed (0)