diff options
Diffstat (limited to 'tests/functional/afr')
4 files changed, 43 insertions, 43 deletions
diff --git a/tests/functional/afr/heal/test_server_side_healing_happens_only_when_glustershd_running.py b/tests/functional/afr/heal/test_server_side_healing_happens_only_when_glustershd_running.py index be1a6fc0f..43b4f4edf 100644 --- a/tests/functional/afr/heal/test_server_side_healing_happens_only_when_glustershd_running.py +++ b/tests/functional/afr/heal/test_server_side_healing_happens_only_when_glustershd_running.py @@ -42,49 +42,43 @@ class SelfHealDaemonProcessTestsWithSingleVolume(GlusterBaseClass): verifies the self-heal daemon process on a single volume """ - @classmethod - def setUpClass(cls): - """ - setup volume, mount volume and initialize necessary variables - which is used in tests - """ + def setUp(self): # Calling GlusterBaseClass setUpClass - cls.get_super_method(cls, 'setUpClass')() + self.get_super_method(self, 'setUp')() + + # Upload script + self.script_upload_path = ("/usr/share/glustolibs/io/scripts/" + "file_dir_ops.py") + ret = upload_scripts(self.clients, [self.script_upload_path]) + if not ret: + raise ExecutionError("Failed to upload IO scripts to clients") # Setup Volume and Mount Volume - ret = cls.setup_volume_and_mount_volume(mounts=cls.mounts) + ret = self.setup_volume_and_mount_volume(mounts=self.mounts) if not ret: raise ExecutionError("Failed to Setup_Volume and Mount_Volume") g.log.info("Successful in Setup Volume and Mount Volume") # Verify glustershd process releases its parent process - ret = is_shd_daemonized(cls.servers) + ret = is_shd_daemonized(self.servers) if not ret: raise ExecutionError("Self Heal Daemon process was still" " holding parent process.") g.log.info("Self Heal Daemon processes are online") - # Upload script - cls.script_upload_path = ("/usr/share/glustolibs/io/scripts/" - "file_dir_ops.py") - ret = upload_scripts(cls.clients, [cls.script_upload_path]) - if not ret: - raise ExecutionError("Failed to upload IO scripts to clients") - - @classmethod - def tearDownClass(cls): + def tearDown(self): """ Clean up the volume and umount volume from client """ # Stopping the volume - ret = cls.unmount_volume_and_cleanup_volume(mounts=cls.mounts) + ret = self.unmount_volume_and_cleanup_volume(mounts=self.mounts) if not ret: raise ExecutionError("Failed to Unmount Volume and Cleanup Volume") g.log.info("Successful in Unmount Volume and Cleanup Volume") - # Calling GlusterBaseClass tearDownClass - cls.get_super_method(cls, 'tearDownClass')() + # Calling GlusterBaseClass tearDown + self.get_super_method(self, 'tearDown')() def test_server_side_healing_happens_only_when_glustershd_running(self): """ 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() diff --git a/tests/functional/afr/test_gfid_assignment_on_dist_rep_vol.py b/tests/functional/afr/test_gfid_assignment_on_dist_rep_vol.py index d49a95fec..2f2bdae88 100644 --- a/tests/functional/afr/test_gfid_assignment_on_dist_rep_vol.py +++ b/tests/functional/afr/test_gfid_assignment_on_dist_rep_vol.py @@ -55,24 +55,26 @@ class AssignGfidsOnAllSubvols(GlusterBaseClass): g.log.info("Successfully uploaded IO scripts to clients %s", cls.clients) + def setUp(self): + + # Calling GlusterBaseClass setUp + self.get_super_method(self, 'setUp')() + # Setup Volume and Mount Volume - g.log.info("Starting to 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 - g.log.info("Starting to clean up Volume %s", cls.volname) - 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(self, dirname): dir_gfids = dict() diff --git a/tests/functional/afr/test_gfid_assignment_on_lookup.py b/tests/functional/afr/test_gfid_assignment_on_lookup.py index c84a9a19c..edd154fc9 100644 --- a/tests/functional/afr/test_gfid_assignment_on_lookup.py +++ b/tests/functional/afr/test_gfid_assignment_on_lookup.py @@ -63,24 +63,24 @@ class AssignGfidOnLookup(GlusterBaseClass): g.log.info("Successfully uploaded IO scripts to clients %s", cls.clients) + def setUp(self): + + self.get_super_method(self, 'setUp')() # Setup Volume and Mount Volume - g.log.info("Starting to 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 - g.log.info("Starting to clean up Volume %s", cls.volname) - 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(self, dirname): dir_gfids = dict() |