From 2fd25b6796e0e0d94d49af5c6d145ea570b4ebb0 Mon Sep 17 00:00:00 2001 From: Di Xu Date: Thu, 24 Aug 2017 17:24:04 +0800 Subject: [PATCH] fix fuzzer for hostpath type that the path can be an empty string --- pkg/api/fuzzer/fuzzer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/api/fuzzer/fuzzer.go b/pkg/api/fuzzer/fuzzer.go index 045952d9cb1..fb3712be643 100644 --- a/pkg/api/fuzzer/fuzzer.go +++ b/pkg/api/fuzzer/fuzzer.go @@ -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 } },