mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
Fix the TestRoundTripTypes by adding default to the fuzzer
This commit is contained in:
parent
2b2be7fa6b
commit
31740d1c37
@ -20,6 +20,7 @@ import (
|
||||
fuzz "github.com/google/gofuzz"
|
||||
runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
"k8s.io/kubernetes/pkg/apis/batch"
|
||||
api "k8s.io/kubernetes/pkg/apis/core"
|
||||
"k8s.io/utils/pointer"
|
||||
)
|
||||
|
||||
@ -72,5 +73,11 @@ var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} {
|
||||
policies := []batch.ConcurrencyPolicy{batch.AllowConcurrent, batch.ForbidConcurrent, batch.ReplaceConcurrent}
|
||||
*cp = policies[c.Rand.Intn(len(policies))]
|
||||
},
|
||||
func(p *batch.PodFailurePolicyOnPodConditionsPattern, c fuzz.Continue) {
|
||||
c.FuzzNoCustom(p)
|
||||
if p.Status == "" {
|
||||
p.Status = api.ConditionTrue
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user