e2e: remove the generic ephemeral volume support check

at present we have the check for kube version 1.21 in the tests
which no longer required as it falls under supported kubernetes
versions with the driver.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
Humble Chirammal 2022-05-26 11:26:35 +05:30 committed by mergify[bot]
parent 7688306f87
commit 2cb52d6535
2 changed files with 50 additions and 56 deletions

View File

@ -298,35 +298,32 @@ var _ = Describe(cephfsType, func() {
}) })
} }
By("verify generic ephemeral volume support", func() { By("verify generic ephemeral volume support", func() {
// generic ephemeral volume support is beta since v1.21. err := createCephfsStorageClass(f.ClientSet, f, true, nil)
if k8sVersionGreaterEquals(f.ClientSet, 1, 21) { if err != nil {
err := createCephfsStorageClass(f.ClientSet, f, true, nil) e2elog.Failf("failed to create CephFS storageclass: %v", err)
if err != nil { }
e2elog.Failf("failed to create CephFS storageclass: %v", err) // create application
} app, err := loadApp(appEphemeralPath)
// create application if err != nil {
app, err := loadApp(appEphemeralPath) e2elog.Failf("failed to load application: %v", err)
if err != nil { }
e2elog.Failf("failed to load application: %v", err) app.Namespace = f.UniqueName
} err = createApp(f.ClientSet, app, deployTimeout)
app.Namespace = f.UniqueName if err != nil {
err = createApp(f.ClientSet, app, deployTimeout) e2elog.Failf("failed to create application: %v", err)
if err != nil { }
e2elog.Failf("failed to create application: %v", err) validateSubvolumeCount(f, 1, fileSystemName, subvolumegroup)
} validateOmapCount(f, 1, cephfsType, metadataPool, volumesType)
validateSubvolumeCount(f, 1, fileSystemName, subvolumegroup) // delete pod
validateOmapCount(f, 1, cephfsType, metadataPool, volumesType) err = deletePod(app.Name, app.Namespace, f.ClientSet, deployTimeout)
// delete pod if err != nil {
err = deletePod(app.Name, app.Namespace, f.ClientSet, deployTimeout) e2elog.Failf("failed to delete application: %v", err)
if err != nil { }
e2elog.Failf("failed to delete application: %v", err) validateSubvolumeCount(f, 0, fileSystemName, subvolumegroup)
} validateOmapCount(f, 0, cephfsType, metadataPool, volumesType)
validateSubvolumeCount(f, 0, fileSystemName, subvolumegroup) err = deleteResource(cephFSExamplePath + "storageclass.yaml")
validateOmapCount(f, 0, cephfsType, metadataPool, volumesType) if err != nil {
err = deleteResource(cephFSExamplePath + "storageclass.yaml") e2elog.Failf("failed to delete CephFS storageclass: %v", err)
if err != nil {
e2elog.Failf("failed to delete CephFS storageclass: %v", err)
}
} }
}) })

View File

@ -715,33 +715,30 @@ var _ = Describe("RBD", func() {
}) })
By("verify generic ephemeral volume support", func() { By("verify generic ephemeral volume support", func() {
// generic ephemeral volume support is supported from 1.21 // create application
if k8sVersionGreaterEquals(f.ClientSet, 1, 21) { app, err := loadApp(appEphemeralPath)
// create application if err != nil {
app, err := loadApp(appEphemeralPath) e2elog.Failf("failed to load application: %v", err)
if err != nil { }
e2elog.Failf("failed to load application: %v", err) app.Namespace = f.UniqueName
} err = createApp(f.ClientSet, app, deployTimeout)
app.Namespace = f.UniqueName if err != nil {
err = createApp(f.ClientSet, app, deployTimeout) e2elog.Failf("failed to create application: %v", err)
if err != nil { }
e2elog.Failf("failed to create application: %v", err) // validate created backend rbd images
} validateRBDImageCount(f, 1, defaultRBDPool)
// validate created backend rbd images validateOmapCount(f, 1, rbdType, defaultRBDPool, volumesType)
validateRBDImageCount(f, 1, defaultRBDPool) err = deletePod(app.Name, app.Namespace, f.ClientSet, deployTimeout)
validateOmapCount(f, 1, rbdType, defaultRBDPool, volumesType) if err != nil {
err = deletePod(app.Name, app.Namespace, f.ClientSet, deployTimeout) e2elog.Failf("failed to delete application: %v", err)
if err != nil { }
e2elog.Failf("failed to delete application: %v", err) // validate created backend rbd images
} validateRBDImageCount(f, 0, defaultRBDPool)
// validate created backend rbd images validateOmapCount(f, 0, rbdType, defaultRBDPool, volumesType)
validateRBDImageCount(f, 0, defaultRBDPool) // validate images in trash
validateOmapCount(f, 0, rbdType, defaultRBDPool, volumesType) err = waitToRemoveImagesFromTrash(f, defaultRBDPool, deployTimeout)
// validate images in trash if err != nil {
err = waitToRemoveImagesFromTrash(f, defaultRBDPool, deployTimeout) e2elog.Failf("failed to validate rbd images in pool %s trash: %v", defaultRBDPool, err)
if err != nil {
e2elog.Failf("failed to validate rbd images in pool %s trash: %v", defaultRBDPool, err)
}
} }
}) })