mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
e2e: validate RBD snapshot under temporary clone image is present
Signed-off-by: Praveen M <m.praveen@ibm.com>
This commit is contained in:
14
e2e/rbd.go
14
e2e/rbd.go
@ -185,6 +185,20 @@ func createORDeleteRbdResources(action kubectlAction) {
|
||||
}
|
||||
}
|
||||
|
||||
func validateRBDSnapshotCount(f *framework.Framework, count int, pool, image string) error {
|
||||
snapshotList, err := listRBDSnapshots(f, pool, image)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to list RBD snapshots: %w", err)
|
||||
}
|
||||
if len(snapshotList) != count {
|
||||
return fmt.Errorf("RBD snapshots count not matching, snapshot count for image %s/%s %d, expected %d"+
|
||||
"snapshots in cluster: %v",
|
||||
pool, image, len(snapshotList), count, snapshotList)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func validateRBDImageCount(f *framework.Framework, count int, pool string) {
|
||||
imageList, err := listRBDImages(f, pool)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user