Merge pull request #84611 from cwdsuzhou/Nov/simplyfy_zone_checker

Simplify volume zone checker codes
This commit is contained in:
Kubernetes Prow Robot
2019-12-19 08:09:57 -08:00
committed by GitHub
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",