summaryrefslogtreecommitdiffstats
path: root/tests/functional/afr/test_dir_gfid_heal_on_all_subvols.py
diff options
context:
space:
mode:
authorkshithijiyer <kshithij.ki@gmail.com>2020-06-05 18:26:29 +0530
committerArthy Loganathan <aloganat@redhat.com>2020-06-08 05:36:23 +0000
commit95a240d570e622c0f7018ca82f1c602a53653042 (patch)
tree44a16a3e2a2c0a8957505b9b9061433ccaca027d /tests/functional/afr/test_dir_gfid_heal_on_all_subvols.py
parentbe7397195d3a4772b69f1afe2f831b3008219ac4 (diff)
[Testfix] Move teardownclass to teardown
Problem: A pattern was observed where testcases which were passing were throwing error in teadownclass this was becuase docleanup was running before teadownclass and when teardownclass was executed it failed as the setup was already cleaned. Solution: Change code to teardown from teardownclass and move setup volume code to setup from setupclass. Change-Id: I37c6fde1f592224c114148f0ed7215b2494b4502 Signed-off-by: kshithijiyer <kshithij.ki@gmail.com>
Diffstat (limited to 'tests/functional/afr/test_dir_gfid_heal_on_all_subvols.py')
-rw-r--r--tests/functional/afr/test_dir_gfid_heal_on_all_subvols.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/functional/afr/test_dir_gfid_heal_on_all_subvols.py b/tests/functional/afr/test_dir_gfid_heal_on_all_subvols.py
index b457442cf..dcce8b418 100644
--- a/tests/functional/afr/test_dir_gfid_heal_on_all_subvols.py
+++ b/tests/functional/afr/test_dir_gfid_heal_on_all_subvols.py
@@ -52,22 +52,26 @@ class AssignGfidsOnAllSubvols(GlusterBaseClass):
g.log.info("Successfully uploaded IO scripts to clients %s",
cls.clients)
+ def setUp(self):
+
+ # Calling GlusterBaseClass setUpClass
+ self.get_super_method(self, 'setUp')()
+
# Setup Volume and Mount Volume
- ret = cls.setup_volume_and_mount_volume(cls.mounts)
+ ret = self.setup_volume_and_mount_volume(self.mounts)
if not ret:
raise ExecutionError("Failed to Setup_Volume and Mount_Volume")
g.log.info("Successful in Setup Volume and Mount Volume")
- @classmethod
- def tearDownClass(cls):
+ def tearDown(self):
# Cleanup Volume
- ret = cls.unmount_volume_and_cleanup_volume(cls.mounts)
+ ret = self.unmount_volume_and_cleanup_volume(self.mounts)
if not ret:
raise ExecutionError("Failed to create volume")
- g.log.info("Successful in cleaning up Volume %s", cls.volname)
+ g.log.info("Successful in cleaning up Volume %s", self.volname)
- cls.get_super_method(cls, 'tearDownClass')()
+ self.get_super_method(self, 'tearDown')()
def verify_gfid_and_retun_gfid(self, dirname):
dir_gfids = dict()