mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-26 06:50:23 +00:00
e2e: validate images in trash for volumegroupsnapshot test
Signed-off-by: Praveen M <m.praveen@ibm.com>
(cherry picked from commit 88b7e0d668
)
This commit is contained in:
parent
bbfb3a77d9
commit
aa15e642e1
@ -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 {
|
||||
|
@ -201,6 +201,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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user