mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +00:00
e2e: remove 1.16 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
c03969fa65
commit
1354cfbf03
90
e2e/rbd.go
90
e2e/rbd.go
@ -1116,26 +1116,19 @@ var _ = Describe("RBD", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
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() {
|
||||||
// pvc clone is only supported from v1.16+
|
validatePVCClone(
|
||||||
if k8sVersionGreaterEquals(f.ClientSet, 1, 16) {
|
defaultCloneCount,
|
||||||
validatePVCClone(
|
pvcPath,
|
||||||
defaultCloneCount,
|
appPath,
|
||||||
pvcPath,
|
pvcSmartClonePath,
|
||||||
appPath,
|
appSmartClonePath,
|
||||||
pvcSmartClonePath,
|
noKMS,
|
||||||
appSmartClonePath,
|
noPVCValidation,
|
||||||
noKMS,
|
f)
|
||||||
noPVCValidation,
|
|
||||||
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() {
|
||||||
// pvc clone is only supported from v1.16+
|
|
||||||
if !k8sVersionGreaterEquals(f.ClientSet, 1, 16) {
|
|
||||||
Skip("pvc clone is only supported from v1.16+")
|
|
||||||
}
|
|
||||||
|
|
||||||
err := deleteResource(rbdExamplePath + "storageclass.yaml")
|
err := deleteResource(rbdExamplePath + "storageclass.yaml")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
e2elog.Failf("failed to delete storageclass with error %v", err)
|
e2elog.Failf("failed to delete storageclass with error %v", err)
|
||||||
@ -1160,10 +1153,6 @@ var _ = Describe("RBD", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
By("create an encrypted PVC snapshot and restore it for an app with VaultKMS", func() {
|
By("create an encrypted PVC snapshot and restore it for an app with VaultKMS", func() {
|
||||||
if !k8sVersionGreaterEquals(f.ClientSet, 1, 16) {
|
|
||||||
Skip("pvc clone is only supported from v1.16+")
|
|
||||||
}
|
|
||||||
|
|
||||||
err := deleteResource(rbdExamplePath + "storageclass.yaml")
|
err := deleteResource(rbdExamplePath + "storageclass.yaml")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
e2elog.Failf("failed to delete storageclass with error %v", err)
|
e2elog.Failf("failed to delete storageclass with error %v", err)
|
||||||
@ -1194,9 +1183,6 @@ var _ = Describe("RBD", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
By("Validate PVC restore from vaultKMS to vaultTenantSAKMS", func() {
|
By("Validate PVC restore from vaultKMS to vaultTenantSAKMS", func() {
|
||||||
if !k8sVersionGreaterEquals(f.ClientSet, 1, 16) {
|
|
||||||
Skip("pvc clone is only supported from v1.16+")
|
|
||||||
}
|
|
||||||
restoreSCName := "restore-sc"
|
restoreSCName := "restore-sc"
|
||||||
err := deleteResource(rbdExamplePath + "storageclass.yaml")
|
err := deleteResource(rbdExamplePath + "storageclass.yaml")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -1251,9 +1237,6 @@ var _ = Describe("RBD", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
By("Validate thick PVC restore from vaultKMS to userSecretsMetadataKMS", func() {
|
By("Validate thick PVC restore from vaultKMS to userSecretsMetadataKMS", func() {
|
||||||
if !k8sVersionGreaterEquals(f.ClientSet, 1, 16) {
|
|
||||||
Skip("pvc clone is only supported from v1.16+")
|
|
||||||
}
|
|
||||||
restoreSCName := "restore-sc"
|
restoreSCName := "restore-sc"
|
||||||
err := deleteResource(rbdExamplePath + "storageclass.yaml")
|
err := deleteResource(rbdExamplePath + "storageclass.yaml")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -1323,10 +1306,6 @@ var _ = Describe("RBD", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
By("create an encrypted PVC-PVC clone and bind it to an app", func() {
|
By("create an encrypted PVC-PVC clone and bind it to an app", func() {
|
||||||
if !k8sVersionGreaterEquals(f.ClientSet, 1, 16) {
|
|
||||||
Skip("pvc clone is only supported from v1.16+")
|
|
||||||
}
|
|
||||||
|
|
||||||
err := deleteResource(rbdExamplePath + "storageclass.yaml")
|
err := deleteResource(rbdExamplePath + "storageclass.yaml")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
e2elog.Failf("failed to delete storageclass with error %v", err)
|
e2elog.Failf("failed to delete storageclass with error %v", err)
|
||||||
@ -1353,10 +1332,6 @@ var _ = Describe("RBD", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
By("create an encrypted PVC-PVC clone and bind it to an app with VaultKMS", func() {
|
By("create an encrypted PVC-PVC clone and bind it to an app with VaultKMS", func() {
|
||||||
if !k8sVersionGreaterEquals(f.ClientSet, 1, 16) {
|
|
||||||
Skip("pvc clone is only supported from v1.16+")
|
|
||||||
}
|
|
||||||
|
|
||||||
err := deleteResource(rbdExamplePath + "storageclass.yaml")
|
err := deleteResource(rbdExamplePath + "storageclass.yaml")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
e2elog.Failf("failed to delete storageclass with error %v", err)
|
e2elog.Failf("failed to delete storageclass with error %v", err)
|
||||||
@ -1389,22 +1364,19 @@ var _ = Describe("RBD", func() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
By("create a Block mode PVC-PVC clone and bind it to an app", func() {
|
By("create a Block mode PVC-PVC clone and bind it to an app", func() {
|
||||||
v, err := f.ClientSet.Discovery().ServerVersion()
|
_, err := f.ClientSet.Discovery().ServerVersion()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
e2elog.Failf("failed to get server version with error %v", err)
|
e2elog.Failf("failed to get server version with error %v", err)
|
||||||
}
|
}
|
||||||
// pvc clone is only supported from v1.16+
|
validatePVCClone(
|
||||||
if v.Major > "1" || (v.Major == "1" && v.Minor >= "16") {
|
defaultCloneCount,
|
||||||
validatePVCClone(
|
rawPvcPath,
|
||||||
defaultCloneCount,
|
rawAppPath,
|
||||||
rawPvcPath,
|
pvcBlockSmartClonePath,
|
||||||
rawAppPath,
|
appBlockSmartClonePath,
|
||||||
pvcBlockSmartClonePath,
|
noKMS,
|
||||||
appBlockSmartClonePath,
|
noPVCValidation,
|
||||||
noKMS,
|
f)
|
||||||
noPVCValidation,
|
|
||||||
f)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
By("create/delete multiple PVCs and Apps", func() {
|
By("create/delete multiple PVCs and Apps", func() {
|
||||||
totalCount := 2
|
totalCount := 2
|
||||||
@ -1485,15 +1457,12 @@ var _ = Describe("RBD", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
By("Resize Block PVC and check Device size", func() {
|
By("Resize Block PVC and check Device size", func() {
|
||||||
// Block PVC resize is supported in kubernetes 1.16+
|
err := resizePVCAndValidateSize(rawPvcPath, rawAppPath, f)
|
||||||
if k8sVersionGreaterEquals(f.ClientSet, 1, 16) {
|
if err != nil {
|
||||||
err := resizePVCAndValidateSize(rawPvcPath, rawAppPath, f)
|
e2elog.Failf("failed to resize block PVC with error %v", err)
|
||||||
if err != nil {
|
|
||||||
e2elog.Failf("failed to resize block PVC with error %v", err)
|
|
||||||
}
|
|
||||||
// validate created backend rbd images
|
|
||||||
validateRBDImageCount(f, 0, defaultRBDPool)
|
|
||||||
}
|
}
|
||||||
|
// validate created backend rbd images
|
||||||
|
validateRBDImageCount(f, 0, defaultRBDPool)
|
||||||
})
|
})
|
||||||
|
|
||||||
By("Test unmount after nodeplugin restart", func() {
|
By("Test unmount after nodeplugin restart", func() {
|
||||||
@ -2485,12 +2454,9 @@ var _ = Describe("RBD", func() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Resize Block PVC and check Device size within the namespace
|
// Resize Block PVC and check Device size within the namespace
|
||||||
// Block PVC resize is supported in kubernetes 1.16+
|
err = resizePVCAndValidateSize(rawPvcPath, rawAppPath, f)
|
||||||
if k8sVersionGreaterEquals(f.ClientSet, 1, 16) {
|
if err != nil {
|
||||||
err = resizePVCAndValidateSize(rawPvcPath, rawAppPath, f)
|
e2elog.Failf("failed to resize block PVC with error %v", err)
|
||||||
if err != nil {
|
|
||||||
e2elog.Failf("failed to resize block PVC with error %v", err)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resize Filesystem PVC and check application directory size
|
// Resize Filesystem PVC and check application directory size
|
||||||
|
Loading…
Reference in New Issue
Block a user