mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
fix fuzzer for hostpath type that the path can be an empty string
This commit is contained in:
parent
b2f3244032
commit
2fd25b6796
@ -360,7 +360,7 @@ var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} {
|
||||
types := []api.HostPathType{api.HostPathUnset, api.HostPathDirectoryOrCreate, api.HostPathDirectory,
|
||||
api.HostPathFileOrCreate, api.HostPathFile, api.HostPathSocket, api.HostPathCharDev, api.HostPathBlockDev}
|
||||
typeVol := types[c.Rand.Intn(len(types))]
|
||||
if obj.Path != "" && obj.Type == nil {
|
||||
if obj.Type == nil {
|
||||
obj.Type = &typeVol
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user