diff options
author | Valerii Ponomarov <vponomar@redhat.com> | 2019-12-13 21:19:07 +0530 |
---|---|---|
committer | Bala Konda Reddy M <bmekala@redhat.com> | 2019-12-18 10:55:39 +0000 |
commit | 6a17654e9be3d5fbae9fa25249a7e2c8d892df3a (patch) | |
tree | 8812776ebfbb0ec17cbc481fd8a3b2c62aecc644 /tests/functional/glusterd/test_rebalance_new_node.py | |
parent | 902dc78766d0938f0e40c71c25a4ce2bb10b005d (diff) |
[py2to3] Add py3 support in 'tests/functional/glusterd'. Part 2
Change-Id: I1395e14d8d0aa0cc6097e51c64262fb481f36f05
Signed-off-by: Valerii Ponomarov <kiparis.kh@gmail.com>
Diffstat (limited to 'tests/functional/glusterd/test_rebalance_new_node.py')
-rw-r--r-- | tests/functional/glusterd/test_rebalance_new_node.py | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/tests/functional/glusterd/test_rebalance_new_node.py b/tests/functional/glusterd/test_rebalance_new_node.py index a9cd0fea6..73fed5e8c 100644 --- a/tests/functional/glusterd/test_rebalance_new_node.py +++ b/tests/functional/glusterd/test_rebalance_new_node.py @@ -14,7 +14,10 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +import sys + 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.gluster.volume_libs import (setup_volume, cleanup_volume) @@ -33,8 +36,7 @@ from glustolibs.gluster.mount_ops import is_mounted class TestRebalanceStatus(GlusterBaseClass): def setUp(self): - - GlusterBaseClass.setUp.im_func(self) + self.get_super_method(self, 'setUp')() # check whether peers are in connected state ret = self.validate_peers_are_connected() @@ -87,13 +89,7 @@ class TestRebalanceStatus(GlusterBaseClass): raise ExecutionError("Peer probe failed to all the servers from " "the node.") - GlusterBaseClass.tearDown.im_func(self) - - @classmethod - def tearDownClass(cls): - - # Calling GlusterBaseClass tearDown - GlusterBaseClass.tearDownClass.im_func(cls) + self.get_super_method(self, 'tearDown')() def test_rebalance_status_from_newly_probed_node(self): @@ -131,12 +127,13 @@ class TestRebalanceStatus(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%d %s create_deep_dirs_with_files " "--dirname-start-num %d " "--dir-depth 10 " "--dir-length 5 " "--max-num-of-dirs 3 " - "--num-of-files 100 %s" % (self.script_upload_path, + "--num-of-files 100 %s" % (sys.version_info.major, + self.script_upload_path, self.counter, mount_obj.mountpoint)) ret = g.run(mount_obj.client_system, cmd) |