Merge pull request #21776 from erictune/job-sel-gen

Selector generation for batch/v1 Job
This commit is contained in:
Fabio Yeon
2016-02-26 11:58:21 -08:00
38 changed files with 1078 additions and 324 deletions

View File

@@ -162,6 +162,11 @@ func FuzzerFor(t *testing.T, version unversioned.GroupVersion, src rand.Source)
parallelism := int(c.Rand.Int31())
j.Completions = &completions
j.Parallelism = &parallelism
if c.Rand.Int31()%2 == 0 {
j.ManualSelector = newBool(true)
} else {
j.ManualSelector = nil
}
},
func(j *api.List, c fuzz.Continue) {
c.FuzzNoCustom(j) // fuzz self without calling this function again
@@ -411,3 +416,9 @@ func FuzzerFor(t *testing.T, version unversioned.GroupVersion, src rand.Source)
)
return f
}
func newBool(val bool) *bool {
p := new(bool)
*p = val
return p
}