Skip to content

Commit 657bba8

Browse files
committed
simplify_test
1 parent 105f939 commit 657bba8

File tree

1 file changed

+2
-30
lines changed

1 file changed

+2
-30
lines changed

pkg/scheduler/framework/plugins/volumezone/volume_zone_test.go

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ func TestIsSchedulableAfterPersistentVolumeClaimAdded(t *testing.T) {
586586
expectedHint: framework.Queue,
587587
expectedErr: true,
588588
},
589-
"pvc-was-added-and-pod-was-not-bound-to-pvc": {
589+
"pvc-was-added-but-pod-was-not-bound-to-pvc": {
590590
pod: st.MakePod().Name("pod_1").Namespace("default").Obj(),
591591
newObj: &v1.PersistentVolumeClaim{
592592
ObjectMeta: metav1.ObjectMeta{Name: "PVC_1", Namespace: "default"},
@@ -618,22 +618,6 @@ func TestIsSchedulableAfterPersistentVolumeClaimAdded(t *testing.T) {
618618
},
619619
expectedHint: framework.Queue,
620620
},
621-
"pvc-was-added-and-pod-was-bound-to-added-pvc, pvc-bound-to-storage-class-with-not-wait-mode": {
622-
pod: createPodWithVolume("pod_1", "PVC_2"),
623-
newObj: &v1.PersistentVolumeClaim{
624-
ObjectMeta: metav1.ObjectMeta{Name: "PVC_2", Namespace: "default"},
625-
Spec: v1.PersistentVolumeClaimSpec{StorageClassName: ptr.To("SC_1")},
626-
},
627-
expectedHint: framework.Queue,
628-
},
629-
"pvc-was-added-and-pod-was-bound-to-added-pvc, pvc-bound-to-storage-class-with-wait-mode": {
630-
pod: createPodWithVolume("pod_1", "PVC_3"),
631-
newObj: &v1.PersistentVolumeClaim{
632-
ObjectMeta: metav1.ObjectMeta{Name: "PVC_3", Namespace: "default"},
633-
Spec: v1.PersistentVolumeClaimSpec{StorageClassName: ptr.To("SC_2")},
634-
},
635-
expectedHint: framework.Queue,
636-
},
637621
"pvc-was-updated-and-pod-was-bound-to-pvc": {
638622
pod: createPodWithVolume("pod_1", "PVC_1"),
639623
oldObj: &v1.PersistentVolumeClaim{
@@ -646,18 +630,6 @@ func TestIsSchedulableAfterPersistentVolumeClaimAdded(t *testing.T) {
646630
},
647631
expectedHint: framework.Queue,
648632
},
649-
"pvc-was-updated-but-pv-doesn't-change": {
650-
pod: createPodWithVolume("pod_1", "PVC_1"),
651-
oldObj: &v1.PersistentVolumeClaim{
652-
ObjectMeta: metav1.ObjectMeta{Name: "PVC_1", Namespace: "default"},
653-
Spec: v1.PersistentVolumeClaimSpec{VolumeName: "Vol_1"},
654-
},
655-
newObj: &v1.PersistentVolumeClaim{
656-
ObjectMeta: metav1.ObjectMeta{Name: "PVC_1", Namespace: "default"},
657-
Spec: v1.PersistentVolumeClaimSpec{VolumeName: "Vol_1"},
658-
},
659-
expectedHint: framework.Queue,
660-
},
661633
"pvc-was-updated-but-pod-was-not-bound-to-pvc": {
662634
pod: createPodWithVolume("pod_1", ""),
663635
oldObj: &v1.PersistentVolumeClaim{
@@ -666,7 +638,7 @@ func TestIsSchedulableAfterPersistentVolumeClaimAdded(t *testing.T) {
666638
},
667639
newObj: &v1.PersistentVolumeClaim{
668640
ObjectMeta: metav1.ObjectMeta{Name: "PVC_1", Namespace: "default"},
669-
Spec: v1.PersistentVolumeClaimSpec{VolumeName: ""},
641+
Spec: v1.PersistentVolumeClaimSpec{VolumeName: "Vol_1"},
670642
},
671643
expectedHint: framework.QueueSkip,
672644
},

0 commit comments

Comments
 (0)