mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-23 21:40:20 +00:00
e2e: only test a single encrypted clone/snapshot
The default number for cloning and snapshot/restore is 10 volumes. This adds to the time the test suite runs. There is no need to validate 10 copies of the encrypted volume, a single copy is sufficient. Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
bb296c4f21
commit
35d58a7d5a
11
e2e/rbd.go
11
e2e/rbd.go
@ -281,6 +281,7 @@ var _ = Describe("RBD", func() {
|
||||
appSmartClonePath := rbdExamplePath + "pod-clone.yaml"
|
||||
appBlockSmartClonePath := rbdExamplePath + "block-pod-clone.yaml"
|
||||
snapshotPath := rbdExamplePath + "snapshot.yaml"
|
||||
defaultCloneCount := 10
|
||||
|
||||
By("checking provisioner deployment is running", func() {
|
||||
err := waitForDeploymentComplete(rbdDeploymentName, cephCSINamespace, f.ClientSet, deployTimeout)
|
||||
@ -496,14 +497,14 @@ var _ = Describe("RBD", func() {
|
||||
By("create a PVC clone and bind it to an app", func() {
|
||||
// snapshot beta is only supported from v1.17+
|
||||
if k8sVersionGreaterEquals(f.ClientSet, 1, 17) {
|
||||
validatePVCSnapshot(pvcPath, appPath, snapshotPath, pvcClonePath, appClonePath, false, f)
|
||||
validatePVCSnapshot(defaultCloneCount, pvcPath, appPath, snapshotPath, pvcClonePath, appClonePath, false, f)
|
||||
}
|
||||
})
|
||||
|
||||
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(pvcPath, appPath, pvcSmartClonePath, appSmartClonePath, false, f)
|
||||
validatePVCClone(defaultCloneCount, pvcPath, appPath, pvcSmartClonePath, appSmartClonePath, false, f)
|
||||
}
|
||||
})
|
||||
|
||||
@ -525,7 +526,7 @@ var _ = Describe("RBD", func() {
|
||||
e2elog.Failf("failed to create storageclass with error %v", err)
|
||||
}
|
||||
|
||||
validatePVCSnapshot(pvcPath, appPath, snapshotPath, pvcClonePath, appClonePath, true, f)
|
||||
validatePVCSnapshot(1, pvcPath, appPath, snapshotPath, pvcClonePath, appClonePath, true, f)
|
||||
|
||||
err = deleteResource(rbdExamplePath + "storageclass.yaml")
|
||||
if err != nil {
|
||||
@ -555,7 +556,7 @@ var _ = Describe("RBD", func() {
|
||||
e2elog.Failf("failed to create storageclass with error %v", err)
|
||||
}
|
||||
|
||||
validatePVCClone(pvcPath, appPath, pvcSmartClonePath, appSmartClonePath, true, f)
|
||||
validatePVCClone(1, pvcPath, appPath, pvcSmartClonePath, appSmartClonePath, true, f)
|
||||
|
||||
err = deleteResource(rbdExamplePath + "storageclass.yaml")
|
||||
if err != nil {
|
||||
@ -580,7 +581,7 @@ var _ = Describe("RBD", func() {
|
||||
}
|
||||
// pvc clone is only supported from v1.16+
|
||||
if v.Major > "1" || (v.Major == "1" && v.Minor >= "16") {
|
||||
validatePVCClone(rawPvcPath, rawAppPath, pvcBlockSmartClonePath, appBlockSmartClonePath, false, f)
|
||||
validatePVCClone(defaultCloneCount, rawPvcPath, rawAppPath, pvcBlockSmartClonePath, appBlockSmartClonePath, false, f)
|
||||
}
|
||||
})
|
||||
By("create/delete multiple PVCs and Apps", func() {
|
||||
|
@ -506,9 +506,8 @@ func writeDataAndCalChecksum(app *v1.Pod, opt *metav1.ListOptions, f *framework.
|
||||
}
|
||||
|
||||
// nolint:gocyclo,gocognit // reduce complexity
|
||||
func validatePVCClone(sourcePvcPath, sourceAppPath, clonePvcPath, clonePvcAppPath string, validateEncryption bool, f *framework.Framework) {
|
||||
func validatePVCClone(totalCount int, sourcePvcPath, sourceAppPath, clonePvcPath, clonePvcAppPath string, validateEncryption bool, f *framework.Framework) {
|
||||
var wg sync.WaitGroup
|
||||
totalCount := 10
|
||||
wgErrs := make([]error, totalCount)
|
||||
chErrs := make([]error, totalCount)
|
||||
pvc, err := loadPVC(sourcePvcPath)
|
||||
@ -653,9 +652,8 @@ func validatePVCClone(sourcePvcPath, sourceAppPath, clonePvcPath, clonePvcAppPat
|
||||
}
|
||||
|
||||
// nolint:gocyclo,gocognit // reduce complexity
|
||||
func validatePVCSnapshot(pvcPath, appPath, snapshotPath, pvcClonePath, appClonePath string, validateEncryption bool, f *framework.Framework) {
|
||||
func validatePVCSnapshot(totalCount int, pvcPath, appPath, snapshotPath, pvcClonePath, appClonePath string, validateEncryption bool, f *framework.Framework) {
|
||||
var wg sync.WaitGroup
|
||||
totalCount := 10
|
||||
wgErrs := make([]error, totalCount)
|
||||
chErrs := make([]error, totalCount)
|
||||
wg.Add(totalCount)
|
||||
|
Loading…
Reference in New Issue
Block a user