diff --git a/pkg/apis/resource/fuzzer/fuzzer.go b/pkg/apis/resource/fuzzer/fuzzer.go index f3203dc6dff..33bfb5bbb95 100644 --- a/pkg/apis/resource/fuzzer/fuzzer.go +++ b/pkg/apis/resource/fuzzer/fuzzer.go @@ -39,6 +39,15 @@ var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} { }[c.Int31n(2)] } }, + func(r *resource.DeviceSubRequest, c randfill.Continue) { + c.FillNoCustom(r) // fuzz self without calling this function again + if r.AllocationMode == "" { + r.AllocationMode = []resource.DeviceAllocationMode{ + resource.DeviceAllocationModeAll, + resource.DeviceAllocationModeExactCount, + }[c.Int31n(2)] + } + }, func(r *resource.DeviceAllocationConfiguration, c randfill.Continue) { c.FillNoCustom(r) if r.Source == "" {