Merge pull request #81611 from gnufied/fix-block-volume-e2e-csi

Fix e2e for block volume expansion
This commit is contained in:
Kubernetes Prow Robot 2019-08-20 02:00:17 -07:00 committed by GitHub
commit cda22916c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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")
}