From f5175d9f76c454487446c979ff95a0b48774a649 Mon Sep 17 00:00:00 2001 From: Hemant Kumar Date: Mon, 19 Aug 2019 15:53:17 -0400 Subject: [PATCH] Fix e2e for block volume expansion --- test/e2e/storage/testsuites/volume_expand.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test/e2e/storage/testsuites/volume_expand.go b/test/e2e/storage/testsuites/volume_expand.go index ae4457dc73f..8d73a4539b0 100644 --- a/test/e2e/storage/testsuites/volume_expand.go +++ b/test/e2e/storage/testsuites/volume_expand.go @@ -190,11 +190,9 @@ func (v *volumeExpandTestSuite) defineTests(driver TestDriver, pattern testpatte l.resource.pvc, err = f.ClientSet.CoreV1().PersistentVolumeClaims(f.Namespace.Name).Get(l.resource.pvc.Name, metav1.GetOptions{}) framework.ExpectNoError(err, "While fetching pvc after controller resize") - if pattern.VolMode == v1.PersistentVolumeBlock || !l.resource.driver.GetDriverInfo().Capabilities[CapNodeExpansion] { - pvcConditions := l.resource.pvc.Status.Conditions - framework.ExpectEqual(len(pvcConditions), 0, "pvc should not have conditions") - } else { - inProgressConditions := l.resource.pvc.Status.Conditions + inProgressConditions := l.resource.pvc.Status.Conditions + // if there are conditions on the PVC, it must be of FileSystemResizePending type + if len(inProgressConditions) > 0 { framework.ExpectEqual(len(inProgressConditions), 1, "pvc must have file system resize pending condition") framework.ExpectEqual(inProgressConditions[0].Type, v1.PersistentVolumeClaimFileSystemResizePending, "pvc must have fs resizing condition") }