Skip to content

Commit cda2291

Browse files
authored
Merge pull request kubernetes#81611 from gnufied/fix-block-volume-e2e-csi
Fix e2e for block volume expansion
2 parents 77ee754 + f5175d9 commit cda2291

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

test/e2e/storage/testsuites/volume_expand.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,9 @@ func (v *volumeExpandTestSuite) defineTests(driver TestDriver, pattern testpatte
190190
l.resource.pvc, err = f.ClientSet.CoreV1().PersistentVolumeClaims(f.Namespace.Name).Get(l.resource.pvc.Name, metav1.GetOptions{})
191191
framework.ExpectNoError(err, "While fetching pvc after controller resize")
192192

193-
if pattern.VolMode == v1.PersistentVolumeBlock || !l.resource.driver.GetDriverInfo().Capabilities[CapNodeExpansion] {
194-
pvcConditions := l.resource.pvc.Status.Conditions
195-
framework.ExpectEqual(len(pvcConditions), 0, "pvc should not have conditions")
196-
} else {
197-
inProgressConditions := l.resource.pvc.Status.Conditions
193+
inProgressConditions := l.resource.pvc.Status.Conditions
194+
// if there are conditions on the PVC, it must be of FileSystemResizePending type
195+
if len(inProgressConditions) > 0 {
198196
framework.ExpectEqual(len(inProgressConditions), 1, "pvc must have file system resize pending condition")
199197
framework.ExpectEqual(inProgressConditions[0].Type, v1.PersistentVolumeClaimFileSystemResizePending, "pvc must have fs resizing condition")
200198
}

0 commit comments

Comments
 (0)