Commit 2fd25b67 authored by Di Xu's avatar Di Xu

fix fuzzer for hostpath type that the path can be an empty string

parent b2f32440
...@@ -360,7 +360,7 @@ var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} { ...@@ -360,7 +360,7 @@ var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} {
types := []api.HostPathType{api.HostPathUnset, api.HostPathDirectoryOrCreate, api.HostPathDirectory, types := []api.HostPathType{api.HostPathUnset, api.HostPathDirectoryOrCreate, api.HostPathDirectory,
api.HostPathFileOrCreate, api.HostPathFile, api.HostPathSocket, api.HostPathCharDev, api.HostPathBlockDev} api.HostPathFileOrCreate, api.HostPathFile, api.HostPathSocket, api.HostPathCharDev, api.HostPathBlockDev}
typeVol := types[c.Rand.Intn(len(types))] typeVol := types[c.Rand.Intn(len(types))]
if obj.Path != "" && obj.Type == nil { if obj.Type == nil {
obj.Type = &typeVol obj.Type = &typeVol
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment