From 080b2518501be02034e14734b68321611b79778f Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Tue, 27 Jul 2021 12:15:09 +0530 Subject: [PATCH] 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 --- e2e/rbd.go | 5 +++++ e2e/rbd_helper.go | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/e2e/rbd.go b/e2e/rbd.go index 1aa1af66b..73c6bfefe 100644 --- a/e2e/rbd.go +++ b/e2e/rbd.go @@ -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 diff --git a/e2e/rbd_helper.go b/e2e/rbd_helper.go index 11b1a6c3c..c30f33977 100644 --- a/e2e/rbd_helper.go +++ b/e2e/rbd_helper.go @@ -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 }