diff options
Diffstat (limited to 'tests/functional/glusterd/test_change_reserve_limit.py')
-rw-r--r-- | tests/functional/glusterd/test_change_reserve_limit.py | 29 |
1 files changed, 7 insertions, 22 deletions
diff --git a/tests/functional/glusterd/test_change_reserve_limit.py b/tests/functional/glusterd/test_change_reserve_limit.py index 07aea98ae..fb6c09edd 100644 --- a/tests/functional/glusterd/test_change_reserve_limit.py +++ b/tests/functional/glusterd/test_change_reserve_limit.py @@ -1,4 +1,4 @@ -# Copyright (C) 2019 Red Hat, Inc. <http://www.redhat.com> +# Copyright (C) 2019-2020 Red Hat, Inc. <http://www.redhat.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,6 +15,7 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. from glusto.core import Glusto as g + from glustolibs.gluster.gluster_base_class import GlusterBaseClass, runs_on from glustolibs.gluster.exceptions import ExecutionError from glustolibs.misc.misc_libs import upload_scripts @@ -24,7 +25,6 @@ from glustolibs.gluster.mount_ops import mount_volume, umount_volume from glustolibs.io.utils import validate_io_procs from glustolibs.gluster.brick_libs import get_all_bricks from glustolibs.gluster.brick_ops import remove_brick -from glustolibs.gluster.glusterdir import rmdir @runs_on([['distributed-replicated'], ['glusterfs']]) @@ -33,16 +33,14 @@ class TestChangeReservcelimit(GlusterBaseClass): @classmethod def setUpClass(cls): cls.counter = 1 - GlusterBaseClass.setUpClass.im_func(cls) + cls.get_super_method(cls, 'setUpClass')() # Uploading file_dir script in all client direcotries g.log.info("Upload io scripts to clients %s for running IO on " "mounts", cls.clients) - script_local_path = ("/usr/share/glustolibs/io/scripts/" - "file_dir_ops.py") cls.script_upload_path = ("/usr/share/glustolibs/io/scripts/" "file_dir_ops.py") - ret = upload_scripts(cls.clients, script_local_path) + ret = upload_scripts(cls.clients, cls.script_upload_path) if not ret: raise ExecutionError("Failed to upload IO scripts to " "clients %s" % cls.clients) @@ -51,25 +49,12 @@ class TestChangeReservcelimit(GlusterBaseClass): def tearDown(self): - # Setting storage.reserve to Default - ret = set_volume_options(self.mnode, self.volname, - {'storage.reserve': '0'}) - if not ret: - raise ExecutionError("Failed to reset storage reserve on %s" - % self.mnode) - g.log.info("Able to reset storage reserve successfully on %s", - self.mnode) - # Unmounting the volume. ret, _, _ = umount_volume(mclient=self.mounts[0].client_system, mpoint=self.mounts[0].mountpoint) if ret: raise ExecutionError("Volume %s is not unmounted" % self.volname) g.log.info("Volume unmounted successfully : %s", self.volname) - ret = rmdir(self.mounts[0].client_system, self.mounts[0].mountpoint) - if not ret: - raise ExecutionError("Failed to remove directory mount directory.") - g.log.info("Mount directory is removed successfully") # clean up all volumes vol_list = get_volume_list(self.mnode) @@ -91,7 +76,7 @@ class TestChangeReservcelimit(GlusterBaseClass): raise ExecutionError("Failed to delete the brick " "dir's of deleted volume") - GlusterBaseClass.tearDown.im_func(self) + self.get_super_method(self, 'tearDown')() def test_change_reserve_limit_to_lower_value(self): @@ -134,7 +119,7 @@ class TestChangeReservcelimit(GlusterBaseClass): for mount_obj in self.mounts: g.log.info("Starting IO on %s:%s", mount_obj.client_system, mount_obj.mountpoint) - cmd = ("python %s create_deep_dirs_with_files " + cmd = ("/usr/bin/env python %s create_deep_dirs_with_files " "--dirname-start-num %d " "--dir-depth 2 " "--dir-length 5 " @@ -222,7 +207,7 @@ class TestChangeReservcelimit(GlusterBaseClass): for mount_obj in self.mounts: g.log.info("Starting IO on %s:%s", mount_obj.client_system, mount_obj.mountpoint) - cmd = ("python %s create_deep_dirs_with_files " + cmd = ("/usr/bin/env python %s create_deep_dirs_with_files " "--dirname-start-num %d " "--dir-depth 2 " "--dir-length 5 " |