addressed feedback. added opt-in cmd line flag

This commit is contained in:
markturansky
2015-04-27 14:57:07 -04:00
parent 2fe8ed5358
commit beacd8722a
3 changed files with 17 additions and 5 deletions

View File

@@ -203,11 +203,13 @@ func FuzzerFor(t *testing.T, version string, src rand.Source) *fuzz.Fuzzer {
},
func(pv *api.PersistentVolume, c fuzz.Continue) {
c.FuzzNoCustom(pv) // fuzz self without calling this function again
pv.Status.Phase = api.VolumePending
types := []api.PersistentVolumePhase{api.VolumePending, api.VolumeBound, api.VolumeReleased, api.VolumeAvailable}
pv.Status.Phase = types[c.Rand.Intn(len(types))]
},
func(pvc *api.PersistentVolumeClaim, c fuzz.Continue) {
c.FuzzNoCustom(pvc) // fuzz self without calling this function again
pvc.Status.Phase = api.ClaimPending
types := []api.PersistentVolumeClaimPhase{api.ClaimBound, api.ClaimPending}
pvc.Status.Phase = types[c.Rand.Intn(len(types))]
},
func(s *api.NamespaceSpec, c fuzz.Continue) {
s.Finalizers = []api.FinalizerName{api.FinalizerKubernetes}