Modify CronJob API to add job history limits, cleanup jobs in controller
This commit is contained in:
@@ -542,6 +542,14 @@ func batchFuncs(t apitesting.TestingCommon) []interface{} {
|
||||
sds := int64(c.RandUint64())
|
||||
sj.StartingDeadlineSeconds = &sds
|
||||
sj.Schedule = c.RandString()
|
||||
if hasSuccessLimit := c.RandBool(); hasSuccessLimit {
|
||||
successfulJobsHistoryLimit := int32(c.Rand.Int31())
|
||||
sj.SuccessfulJobsHistoryLimit = &successfulJobsHistoryLimit
|
||||
}
|
||||
if hasFailedLimit := c.RandBool(); hasFailedLimit {
|
||||
failedJobsHistoryLimit := int32(c.Rand.Int31())
|
||||
sj.FailedJobsHistoryLimit = &failedJobsHistoryLimit
|
||||
}
|
||||
},
|
||||
func(cp *batch.ConcurrencyPolicy, c fuzz.Continue) {
|
||||
policies := []batch.ConcurrencyPolicy{batch.AllowConcurrent, batch.ForbidConcurrent, batch.ReplaceConcurrent}
|
||||
|
Reference in New Issue
Block a user