simplify volume zone checker

This commit is contained in:
caiweidong
2019-11-01 01:11:56 +08:00
parent 7d13dfe3c3
commit fd6983c70f
2 changed files with 69 additions and 60 deletions

View File

@@ -317,16 +317,18 @@ func TestWithBinding(t *testing.T) {
Node: testNode,
},
{
name: "unbound volume empty storage class",
Pod: createPodWithVolume("pod_1", "vol_1", "PVC_EmptySC"),
Node: testNode,
wantStatus: framework.NewStatus(framework.Error, "PersistentVolumeClaim was not found: \"PVC_EmptySC\""),
name: "unbound volume empty storage class",
Pod: createPodWithVolume("pod_1", "vol_1", "PVC_EmptySC"),
Node: testNode,
wantStatus: framework.NewStatus(framework.Error,
"PersistentVolumeClaim had no pv name and storageClass name"),
},
{
name: "unbound volume no storage class",
Pod: createPodWithVolume("pod_1", "vol_1", "PVC_NoSC"),
Node: testNode,
wantStatus: framework.NewStatus(framework.Error, "PersistentVolumeClaim was not found: \"PVC_NoSC\""),
name: "unbound volume no storage class",
Pod: createPodWithVolume("pod_1", "vol_1", "PVC_NoSC"),
Node: testNode,
wantStatus: framework.NewStatus(framework.Error,
"StorageClass \"Class_0\" claimed by PersistentVolumeClaim \"PVC_NoSC\" not found"),
},
{
name: "unbound volume immediate binding mode",