diff --git a/e2e/utils.go b/e2e/utils.go index 7e0f94d61..81fdc3582 100644 --- a/e2e/utils.go +++ b/e2e/utils.go @@ -214,6 +214,14 @@ func validateOmapCount(f *framework.Framework, count int, driver, pool, mode str radosLsKeysCmd: "rados listomapkeys csi.groups.default " + cephfsOptions(pool), radosLsKeysCmdFilter: fmt.Sprintf("rados listomapkeys csi.groups.default %s | wc -l", cephfsOptions(pool)), }, + { + volumeMode: groupSnapsType, + driverType: rbdType, + radosLsCmd: "rados ls" + rbdOptions(pool), + radosLsCmdFilter: fmt.Sprintf("rados ls %s | grep -v default | grep -c ^csi.volume.group.", rbdOptions(pool)), + radosLsKeysCmd: "rados listomapkeys csi.groups.default " + rbdOptions(pool), + radosLsKeysCmdFilter: fmt.Sprintf("rados listomapkeys csi.groups.default %s | wc -l", rbdOptions(pool)), + }, } for _, cmds := range radosListCommands { diff --git a/e2e/volumegroupsnapshot.go b/e2e/volumegroupsnapshot.go index 8a41aef57..9ffe4b349 100644 --- a/e2e/volumegroupsnapshot.go +++ b/e2e/volumegroupsnapshot.go @@ -176,6 +176,14 @@ func (rvgs *rbdVolumeGroupSnapshot) ValidateResourcesForCreate(vgs *groupsnapapi func (rvgs *rbdVolumeGroupSnapshot) ValidateResourcesForDelete() error { validateOmapCount(rvgs.framework, 0, rbdType, defaultRBDPool, volumesType) + validateOmapCount(rvgs.framework, 0, rbdType, defaultRBDPool, snapsType) + validateOmapCount(rvgs.framework, 0, rbdType, defaultRBDPool, groupSnapsType) + validateRBDImageCount(rvgs.framework, 0, defaultRBDPool) + + err := waitToRemoveImagesFromTrash(rvgs.framework, defaultRBDPool, deployTimeout) + if err != nil { + return err + } return nil }