mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 08:17:26 +00:00
Fix a broken custom fuzzer
Trying to create IntStrs from int64s rather than int32s resulted in lots of glog.Error messages that showed up when running tests with "-v".
This commit is contained in:
parent
b8b8b22a9e
commit
b684f73e5c
@ -153,10 +153,10 @@ func FuzzerFor(t *testing.T, version schema.GroupVersion, src rand.Source) *fuzz
|
|||||||
} else {
|
} else {
|
||||||
rollingUpdate := extensions.RollingUpdateDeployment{}
|
rollingUpdate := extensions.RollingUpdateDeployment{}
|
||||||
if c.RandBool() {
|
if c.RandBool() {
|
||||||
rollingUpdate.MaxUnavailable = intstr.FromInt(int(c.RandUint64()))
|
rollingUpdate.MaxUnavailable = intstr.FromInt(int(c.Rand.Int31()))
|
||||||
rollingUpdate.MaxSurge = intstr.FromInt(int(c.RandUint64()))
|
rollingUpdate.MaxSurge = intstr.FromInt(int(c.Rand.Int31()))
|
||||||
} else {
|
} else {
|
||||||
rollingUpdate.MaxSurge = intstr.FromString(fmt.Sprintf("%d%%", c.RandUint64()))
|
rollingUpdate.MaxSurge = intstr.FromString(fmt.Sprintf("%d%%", c.Rand.Int31()))
|
||||||
}
|
}
|
||||||
j.RollingUpdate = &rollingUpdate
|
j.RollingUpdate = &rollingUpdate
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user