e2e: validate images in trash for rados namespace

added validation check to verify stale images in trash
for the rados namespace testing.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2021-07-27 12:15:09 +05:30 committed by mergify[bot]
parent 8f185bf7b2
commit 080b251850
2 changed files with 6 additions and 1 deletions

View File

@ -1945,6 +1945,11 @@ var _ = Describe("RBD", func() {
e2elog.Failf("failed to delete PVC with error %v", err)
}
validateRBDImageCount(f, 0, defaultRBDPool)
err = waitToRemoveImagesFromTrash(f, defaultRBDPool, deployTimeout)
if err != nil {
e2elog.Failf("failed to validate rbd images in pool %s trash with error %v", rbdOptions(defaultRBDPool), err)
}
}
// delete RBD provisioner secret

View File

@ -881,7 +881,7 @@ func listRBDImagesInTrash(f *framework.Framework, poolName string) ([]trashInfo,
var trashInfos []trashInfo
stdout, stdErr, err := execCommandInToolBoxPod(f,
fmt.Sprintf("rbd trash ls --format=json %s", poolName), rookNamespace)
fmt.Sprintf("rbd trash ls --format=json %s", rbdOptions(poolName)), rookNamespace)
if err != nil {
return trashInfos, err
}