Validate that PV capacity and PVC capacity requests are greater than zero

This commit is contained in:
Ian Chakeres
2017-11-11 15:39:37 -08:00
parent 81fa823a6c
commit 98e2c8cdee
3 changed files with 51 additions and 5 deletions

View File

@@ -494,7 +494,7 @@ func TestPersistentVolumeMultiPVs(t *testing.T) {
pvs := make([]*v1.PersistentVolume, maxPVs)
for i := 0; i < maxPVs; i++ {
// This PV will be claimed, released, and deleted
pvs[i] = createPV("pv-"+strconv.Itoa(i), "/tmp/foo"+strconv.Itoa(i), strconv.Itoa(i)+"G",
pvs[i] = createPV("pv-"+strconv.Itoa(i), "/tmp/foo"+strconv.Itoa(i), strconv.Itoa(i+1)+"G",
[]v1.PersistentVolumeAccessMode{v1.ReadWriteOnce}, v1.PersistentVolumeReclaimRetain)
}