e2e: validate RBD snapshot under temporary clone image is present

Signed-off-by: Praveen M <m.praveen@ibm.com>
This commit is contained in:
Praveen M
2025-02-20 19:12:04 +05:30
committed by mergify[bot]
parent 0ed0af120b
commit 2af7269551
3 changed files with 54 additions and 0 deletions

View File

@ -1003,6 +1003,16 @@ func validatePVCClone(
if wgErrs[n] == nil && validatePVC != nil && kms != noKMS {
wgErrs[n] = validatePVC(f, &p, &a)
}
if wgErrs[n] == nil {
// validate RBD snapshot under temporary clone is not deleted.
imageData, imageInfoerr := getImageInfoFromPVC(p.Namespace, name, f)
if imageInfoerr != nil {
wgErrs[n] = imageInfoerr
} else {
tempRBDImageName := imageData.imageName + "-temp"
wgErrs[n] = validateRBDSnapshotCount(f, 1, defaultRBDPool, tempRBDImageName)
}
}
wg.Done()
}(i, *pvcClone, *appClone)
}