mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-22 22:30:23 +00:00
e2e: remove 1.15 based test enablement in rbd
considering we are far out of this release and only care about kubernetes releases from v1.20, there is no need to have this version check in place for the tests. Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
parent
1354cfbf03
commit
2ac3f129c0
147
e2e/rbd.go
147
e2e/rbd.go
@ -1112,7 +1112,6 @@ var _ = Describe("RBD", func() {
|
|||||||
noKMS, noKMS,
|
noKMS, noKMS,
|
||||||
defaultSCName,
|
defaultSCName,
|
||||||
f)
|
f)
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
By("create a PVC-PVC clone and bind it to an app", func() {
|
By("create a PVC-PVC clone and bind it to an app", func() {
|
||||||
@ -1125,7 +1124,6 @@ var _ = Describe("RBD", func() {
|
|||||||
noKMS,
|
noKMS,
|
||||||
noPVCValidation,
|
noPVCValidation,
|
||||||
f)
|
f)
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
By("create a thick-provisioned PVC-PVC clone and bind it to an app", func() {
|
By("create a thick-provisioned PVC-PVC clone and bind it to an app", func() {
|
||||||
@ -1426,34 +1424,31 @@ var _ = Describe("RBD", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
By("Resize Filesystem PVC and check application directory size", func() {
|
By("Resize Filesystem PVC and check application directory size", func() {
|
||||||
// Resize 0.3.0 is only supported from v1.15+
|
err := resizePVCAndValidateSize(pvcPath, appPath, f)
|
||||||
if k8sVersionGreaterEquals(f.ClientSet, 1, 15) {
|
if err != nil {
|
||||||
err := resizePVCAndValidateSize(pvcPath, appPath, f)
|
e2elog.Failf("failed to resize filesystem PVC %v", err)
|
||||||
if err != nil {
|
|
||||||
e2elog.Failf("failed to resize filesystem PVC %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
err = deleteResource(rbdExamplePath + "storageclass.yaml")
|
|
||||||
if err != nil {
|
|
||||||
e2elog.Failf("failed to delete storageclass with error %v", err)
|
|
||||||
}
|
|
||||||
err = createRBDStorageClass(
|
|
||||||
f.ClientSet,
|
|
||||||
f,
|
|
||||||
defaultSCName,
|
|
||||||
nil,
|
|
||||||
map[string]string{"csi.storage.k8s.io/fstype": "xfs"},
|
|
||||||
deletePolicy)
|
|
||||||
if err != nil {
|
|
||||||
e2elog.Failf("failed to create storageclass with error %v", err)
|
|
||||||
}
|
|
||||||
err = resizePVCAndValidateSize(pvcPath, appPath, f)
|
|
||||||
if err != nil {
|
|
||||||
e2elog.Failf("failed to resize filesystem PVC with error %v", err)
|
|
||||||
}
|
|
||||||
// validate created backend rbd images
|
|
||||||
validateRBDImageCount(f, 0, defaultRBDPool)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = deleteResource(rbdExamplePath + "storageclass.yaml")
|
||||||
|
if err != nil {
|
||||||
|
e2elog.Failf("failed to delete storageclass with error %v", err)
|
||||||
|
}
|
||||||
|
err = createRBDStorageClass(
|
||||||
|
f.ClientSet,
|
||||||
|
f,
|
||||||
|
defaultSCName,
|
||||||
|
nil,
|
||||||
|
map[string]string{"csi.storage.k8s.io/fstype": "xfs"},
|
||||||
|
deletePolicy)
|
||||||
|
if err != nil {
|
||||||
|
e2elog.Failf("failed to create storageclass with error %v", err)
|
||||||
|
}
|
||||||
|
err = resizePVCAndValidateSize(pvcPath, appPath, f)
|
||||||
|
if err != nil {
|
||||||
|
e2elog.Failf("failed to resize filesystem PVC with error %v", err)
|
||||||
|
}
|
||||||
|
// validate created backend rbd images
|
||||||
|
validateRBDImageCount(f, 0, defaultRBDPool)
|
||||||
})
|
})
|
||||||
|
|
||||||
By("Resize Block PVC and check Device size", func() {
|
By("Resize Block PVC and check Device size", func() {
|
||||||
@ -2027,7 +2022,6 @@ var _ = Describe("RBD", func() {
|
|||||||
}
|
}
|
||||||
// validate created backend rbd images
|
// validate created backend rbd images
|
||||||
validateRBDImageCount(f, 0, defaultRBDPool)
|
validateRBDImageCount(f, 0, defaultRBDPool)
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
By("validate PVC mounting if snapshot and parent PVC are deleted", func() {
|
By("validate PVC mounting if snapshot and parent PVC are deleted", func() {
|
||||||
@ -2460,12 +2454,9 @@ var _ = Describe("RBD", func() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Resize Filesystem PVC and check application directory size
|
// Resize Filesystem PVC and check application directory size
|
||||||
// Resize 0.3.0 is only supported from v1.15+
|
err = resizePVCAndValidateSize(pvcPath, appPath, f)
|
||||||
if k8sVersionGreaterEquals(f.ClientSet, 1, 15) {
|
if err != nil {
|
||||||
err = resizePVCAndValidateSize(pvcPath, appPath, f)
|
e2elog.Failf("failed to resize filesystem PVC %v", err)
|
||||||
if err != nil {
|
|
||||||
e2elog.Failf("failed to resize filesystem PVC %v", err)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a PVC clone and bind it to an app within the namespace
|
// Create a PVC clone and bind it to an app within the namespace
|
||||||
@ -2476,58 +2467,52 @@ var _ = Describe("RBD", func() {
|
|||||||
defer func() {
|
defer func() {
|
||||||
err = deleteRBDSnapshotClass()
|
err = deleteRBDSnapshotClass()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
e2elog.Failf("failed to create storageclass with error %v", err)
|
e2elog.Failf("failed to delete VolumeSnapshotClass: %v", err)
|
||||||
}
|
}
|
||||||
defer func() {
|
}()
|
||||||
err = deleteRBDSnapshotClass()
|
|
||||||
if err != nil {
|
|
||||||
e2elog.Failf("failed to delete VolumeSnapshotClass: %v", err)
|
|
||||||
}
|
|
||||||
}()
|
|
||||||
|
|
||||||
pvc, pvcErr := loadPVC(pvcPath)
|
pvc, pvcErr := loadPVC(pvcPath)
|
||||||
if pvcErr != nil {
|
if pvcErr != nil {
|
||||||
e2elog.Failf("failed to load PVC with error %v", pvcErr)
|
e2elog.Failf("failed to load PVC with error %v", pvcErr)
|
||||||
}
|
}
|
||||||
|
|
||||||
pvc.Namespace = f.UniqueName
|
pvc.Namespace = f.UniqueName
|
||||||
err = createPVCAndvalidatePV(f.ClientSet, pvc, deployTimeout)
|
err = createPVCAndvalidatePV(f.ClientSet, pvc, deployTimeout)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
e2elog.Failf("failed to create PVC with error %v", err)
|
e2elog.Failf("failed to create PVC with error %v", err)
|
||||||
}
|
}
|
||||||
// validate created backend rbd images
|
// validate created backend rbd images
|
||||||
validateRBDImageCount(f, 1, defaultRBDPool)
|
validateRBDImageCount(f, 1, defaultRBDPool)
|
||||||
|
|
||||||
snap := getSnapshot(snapshotPath)
|
snap := getSnapshot(snapshotPath)
|
||||||
snap.Namespace = f.UniqueName
|
snap.Namespace = f.UniqueName
|
||||||
snap.Spec.Source.PersistentVolumeClaimName = &pvc.Name
|
snap.Spec.Source.PersistentVolumeClaimName = &pvc.Name
|
||||||
err = createSnapshot(&snap, deployTimeout)
|
err = createSnapshot(&snap, deployTimeout)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
e2elog.Failf("failed to create snapshot with error %v", err)
|
e2elog.Failf("failed to create snapshot with error %v", err)
|
||||||
}
|
}
|
||||||
validateRBDImageCount(f, 2, defaultRBDPool)
|
validateRBDImageCount(f, 2, defaultRBDPool)
|
||||||
|
|
||||||
err = validatePVCAndAppBinding(pvcClonePath, appClonePath, f)
|
err = validatePVCAndAppBinding(pvcClonePath, appClonePath, f)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
e2elog.Failf("failed to validate pvc and application binding with error %v", err)
|
e2elog.Failf("failed to validate pvc and application binding with error %v", err)
|
||||||
}
|
}
|
||||||
err = deleteSnapshot(&snap, deployTimeout)
|
err = deleteSnapshot(&snap, deployTimeout)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
e2elog.Failf("failed to delete snapshot with error %v", err)
|
e2elog.Failf("failed to delete snapshot with error %v", err)
|
||||||
}
|
}
|
||||||
// as snapshot is deleted the image count should be one
|
// as snapshot is deleted the image count should be one
|
||||||
validateRBDImageCount(f, 1, defaultRBDPool)
|
validateRBDImageCount(f, 1, defaultRBDPool)
|
||||||
|
|
||||||
err = deletePVCAndValidatePV(f.ClientSet, pvc, deployTimeout)
|
err = deletePVCAndValidatePV(f.ClientSet, pvc, deployTimeout)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
e2elog.Failf("failed to delete PVC with error %v", err)
|
e2elog.Failf("failed to delete PVC with error %v", err)
|
||||||
}
|
}
|
||||||
validateRBDImageCount(f, 0, defaultRBDPool)
|
validateRBDImageCount(f, 0, defaultRBDPool)
|
||||||
|
|
||||||
err = waitToRemoveImagesFromTrash(f, defaultRBDPool, deployTimeout)
|
err = waitToRemoveImagesFromTrash(f, defaultRBDPool, deployTimeout)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
e2elog.Failf("failed to validate rbd images in pool %s trash with error %v", rbdOptions(defaultRBDPool), err)
|
e2elog.Failf("failed to validate rbd images in pool %s trash with error %v", rbdOptions(defaultRBDPool), err)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// delete RBD provisioner secret
|
// delete RBD provisioner secret
|
||||||
|
Loading…
Reference in New Issue
Block a user