fix fuzzer for hostpath type that the path can be an empty string
This commit is contained in:
		| @@ -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 | ||||||
| 			} | 			} | ||||||
| 		}, | 		}, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Di Xu
					Di Xu