mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-22 14:20:19 +00:00
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:
parent
7688306f87
commit
2cb52d6535
@ -298,35 +298,32 @@ var _ = Describe(cephfsType, func() {
|
||||
})
|
||||
}
|
||||
By("verify generic ephemeral volume support", func() {
|
||||
// generic ephemeral volume support is beta since v1.21.
|
||||
if k8sVersionGreaterEquals(f.ClientSet, 1, 21) {
|
||||
err := createCephfsStorageClass(f.ClientSet, f, true, nil)
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to create CephFS storageclass: %v", err)
|
||||
}
|
||||
// create application
|
||||
app, err := loadApp(appEphemeralPath)
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to load application: %v", err)
|
||||
}
|
||||
app.Namespace = f.UniqueName
|
||||
err = createApp(f.ClientSet, app, deployTimeout)
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to create application: %v", err)
|
||||
}
|
||||
validateSubvolumeCount(f, 1, fileSystemName, subvolumegroup)
|
||||
validateOmapCount(f, 1, cephfsType, metadataPool, volumesType)
|
||||
// delete pod
|
||||
err = deletePod(app.Name, app.Namespace, f.ClientSet, deployTimeout)
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to delete application: %v", err)
|
||||
}
|
||||
validateSubvolumeCount(f, 0, fileSystemName, subvolumegroup)
|
||||
validateOmapCount(f, 0, cephfsType, metadataPool, volumesType)
|
||||
err = deleteResource(cephFSExamplePath + "storageclass.yaml")
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to delete CephFS storageclass: %v", err)
|
||||
}
|
||||
err := createCephfsStorageClass(f.ClientSet, f, true, nil)
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to create CephFS storageclass: %v", err)
|
||||
}
|
||||
// create application
|
||||
app, err := loadApp(appEphemeralPath)
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to load application: %v", err)
|
||||
}
|
||||
app.Namespace = f.UniqueName
|
||||
err = createApp(f.ClientSet, app, deployTimeout)
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to create application: %v", err)
|
||||
}
|
||||
validateSubvolumeCount(f, 1, fileSystemName, subvolumegroup)
|
||||
validateOmapCount(f, 1, cephfsType, metadataPool, volumesType)
|
||||
// delete pod
|
||||
err = deletePod(app.Name, app.Namespace, f.ClientSet, deployTimeout)
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to delete application: %v", err)
|
||||
}
|
||||
validateSubvolumeCount(f, 0, fileSystemName, subvolumegroup)
|
||||
validateOmapCount(f, 0, cephfsType, metadataPool, volumesType)
|
||||
err = deleteResource(cephFSExamplePath + "storageclass.yaml")
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to delete CephFS storageclass: %v", err)
|
||||
}
|
||||
})
|
||||
|
||||
|
51
e2e/rbd.go
51
e2e/rbd.go
@ -715,33 +715,30 @@ var _ = Describe("RBD", func() {
|
||||
})
|
||||
|
||||
By("verify generic ephemeral volume support", func() {
|
||||
// generic ephemeral volume support is supported from 1.21
|
||||
if k8sVersionGreaterEquals(f.ClientSet, 1, 21) {
|
||||
// create application
|
||||
app, err := loadApp(appEphemeralPath)
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to load application: %v", err)
|
||||
}
|
||||
app.Namespace = f.UniqueName
|
||||
err = createApp(f.ClientSet, app, deployTimeout)
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to create application: %v", err)
|
||||
}
|
||||
// validate created backend rbd images
|
||||
validateRBDImageCount(f, 1, defaultRBDPool)
|
||||
validateOmapCount(f, 1, rbdType, defaultRBDPool, volumesType)
|
||||
err = deletePod(app.Name, app.Namespace, f.ClientSet, deployTimeout)
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to delete application: %v", err)
|
||||
}
|
||||
// validate created backend rbd images
|
||||
validateRBDImageCount(f, 0, defaultRBDPool)
|
||||
validateOmapCount(f, 0, rbdType, defaultRBDPool, volumesType)
|
||||
// validate images in trash
|
||||
err = waitToRemoveImagesFromTrash(f, defaultRBDPool, deployTimeout)
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to validate rbd images in pool %s trash: %v", defaultRBDPool, err)
|
||||
}
|
||||
// create application
|
||||
app, err := loadApp(appEphemeralPath)
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to load application: %v", err)
|
||||
}
|
||||
app.Namespace = f.UniqueName
|
||||
err = createApp(f.ClientSet, app, deployTimeout)
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to create application: %v", err)
|
||||
}
|
||||
// validate created backend rbd images
|
||||
validateRBDImageCount(f, 1, defaultRBDPool)
|
||||
validateOmapCount(f, 1, rbdType, defaultRBDPool, volumesType)
|
||||
err = deletePod(app.Name, app.Namespace, f.ClientSet, deployTimeout)
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to delete application: %v", err)
|
||||
}
|
||||
// validate created backend rbd images
|
||||
validateRBDImageCount(f, 0, defaultRBDPool)
|
||||
validateOmapCount(f, 0, rbdType, defaultRBDPool, volumesType)
|
||||
// validate images in trash
|
||||
err = waitToRemoveImagesFromTrash(f, defaultRBDPool, deployTimeout)
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to validate rbd images in pool %s trash: %v", defaultRBDPool, err)
|
||||
}
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user