From 87feb4e7d8feb84c80cb13d5347fe40d44d2854e Mon Sep 17 00:00:00 2001 From: Prasad Desala Date: Fri, 7 Dec 2018 15:50:27 +0530 Subject: TC: test_add_brick_while_remove_brick_is_in_progress Add-brick command failure is leaving the directories created on the backend bricks which is resulting in the failure of the subsequent cases. Added some changes to clean the bricks. Change-Id: I108efbcaef2010f6fd52c334446059f96fff3741 Signed-off-by: Prasad Desala --- .../dht/test_add_brick_while_remove_brick_is_in_progress.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'tests/functional/dht') diff --git a/tests/functional/dht/test_add_brick_while_remove_brick_is_in_progress.py b/tests/functional/dht/test_add_brick_while_remove_brick_is_in_progress.py index 9451593a9..21297ced8 100644 --- a/tests/functional/dht/test_add_brick_while_remove_brick_is_in_progress.py +++ b/tests/functional/dht/test_add_brick_while_remove_brick_is_in_progress.py @@ -175,9 +175,18 @@ class RemoveBrickValidation(GlusterBaseClass): g.log.info(out) # Expanding volume while volume shrink is in-progress - g.log.info("Volume %s: Expand volume while volume shrink in-progress") + g.log.info("Volume %s: Expand volume while volume shrink in-progress", + self.volname) _, _, err = add_brick(self.mnode, self.volname, self.add_brick_list) self.assertIn("rebalance is in progress", err, "Successfully added" "bricks to the volume ") g.log.info("Volume %s: Failed to add-bricks while volume shrink " "in-progress ", self.volname) + + # cleanup add-bricks list + for brick in self.add_brick_list: + brick_node, brick_path = brick.split(":") + ret, _, _ = g.run(brick_node, ("rm -rf %s", brick_path)) + if ret != 0: + g.log.error("Failed to clean %s:%s", brick_node, brick_path) + g.log.info("Successfully cleaned backend add-brick bricks list") -- cgit