Return UnschedulableAndUnresolvable instead of Error when failing to lookup pvc or storageclass in VolumeZone plugin

This commit is contained in:
Abdullah Gharaibeh
2021-05-25 18:58:11 -04:00
parent 5640c64a9f
commit 17551f291d
2 changed files with 13 additions and 13 deletions

View File

@@ -413,21 +413,21 @@ func TestWithBinding(t *testing.T) {
name: "unbound volume empty storage class",
Pod: createPodWithVolume("pod_1", "vol_1", "PVC_EmptySC"),
Node: testNode,
wantStatus: framework.NewStatus(framework.Error,
wantStatus: framework.NewStatus(framework.UnschedulableAndUnresolvable,
"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,
"StorageClass \"Class_0\" claimed by PersistentVolumeClaim \"PVC_NoSC\" not found"),
wantStatus: framework.NewStatus(framework.UnschedulableAndUnresolvable,
"unable to find storage class: Class_0"),
},
{
name: "unbound volume immediate binding mode",
Pod: createPodWithVolume("pod_1", "vol_1", "PVC_ImmediateSC"),
Node: testNode,
wantStatus: framework.NewStatus(framework.Error, "VolumeBindingMode not set for StorageClass \"Class_Immediate\""),
wantStatus: framework.NewStatus(framework.UnschedulableAndUnresolvable, "VolumeBindingMode not set for StorageClass \"Class_Immediate\""),
},
{
name: "unbound volume wait binding mode",