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:
Humble Chirammal 2021-11-03 15:28:19 +05:30 committed by mergify[bot]
parent c03969fa65
commit 1354cfbf03

View File

@ -1116,8 +1116,6 @@ var _ = Describe("RBD", func() {
})
By("create a PVC-PVC clone and bind it to an app", func() {
// pvc clone is only supported from v1.16+
if k8sVersionGreaterEquals(f.ClientSet, 1, 16) {
validatePVCClone(
defaultCloneCount,
pvcPath,
@ -1127,15 +1125,10 @@ var _ = Describe("RBD", func() {
noKMS,
noPVCValidation,
f)
}
})
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")
if err != nil {
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() {
if !k8sVersionGreaterEquals(f.ClientSet, 1, 16) {
Skip("pvc clone is only supported from v1.16+")
}
err := deleteResource(rbdExamplePath + "storageclass.yaml")
if err != nil {
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() {
if !k8sVersionGreaterEquals(f.ClientSet, 1, 16) {
Skip("pvc clone is only supported from v1.16+")
}
restoreSCName := "restore-sc"
err := deleteResource(rbdExamplePath + "storageclass.yaml")
if err != nil {
@ -1251,9 +1237,6 @@ var _ = Describe("RBD", 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"
err := deleteResource(rbdExamplePath + "storageclass.yaml")
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() {
if !k8sVersionGreaterEquals(f.ClientSet, 1, 16) {
Skip("pvc clone is only supported from v1.16+")
}
err := deleteResource(rbdExamplePath + "storageclass.yaml")
if err != nil {
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() {
if !k8sVersionGreaterEquals(f.ClientSet, 1, 16) {
Skip("pvc clone is only supported from v1.16+")
}
err := deleteResource(rbdExamplePath + "storageclass.yaml")
if err != nil {
e2elog.Failf("failed to delete storageclass with error %v", err)
@ -1389,12 +1364,10 @@ var _ = Describe("RBD", 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 {
e2elog.Failf("failed to get server version with error %v", err)
}
// pvc clone is only supported from v1.16+
if v.Major > "1" || (v.Major == "1" && v.Minor >= "16") {
validatePVCClone(
defaultCloneCount,
rawPvcPath,
@ -1404,7 +1377,6 @@ var _ = Describe("RBD", func() {
noKMS,
noPVCValidation,
f)
}
})
By("create/delete multiple PVCs and Apps", func() {
totalCount := 2
@ -1485,15 +1457,12 @@ var _ = Describe("RBD", func() {
})
By("Resize Block PVC and check Device size", func() {
// Block PVC resize is supported in kubernetes 1.16+
if k8sVersionGreaterEquals(f.ClientSet, 1, 16) {
err := resizePVCAndValidateSize(rawPvcPath, rawAppPath, f)
if err != nil {
e2elog.Failf("failed to resize block PVC with error %v", err)
}
// validate created backend rbd images
validateRBDImageCount(f, 0, defaultRBDPool)
}
})
By("Test unmount after nodeplugin restart", func() {
@ -2485,13 +2454,10 @@ var _ = Describe("RBD", func() {
}
// Resize Block PVC and check Device size within the namespace
// Block PVC resize is supported in kubernetes 1.16+
if k8sVersionGreaterEquals(f.ClientSet, 1, 16) {
err = resizePVCAndValidateSize(rawPvcPath, rawAppPath, f)
if err != nil {
e2elog.Failf("failed to resize block PVC with error %v", err)
}
}
// Resize Filesystem PVC and check application directory size
// Resize 0.3.0 is only supported from v1.15+