From 6a17654e9be3d5fbae9fa25249a7e2c8d892df3a Mon Sep 17 00:00:00 2001 From: Valerii Ponomarov Date: Fri, 13 Dec 2019 21:19:07 +0530 Subject: [py2to3] Add py3 support in 'tests/functional/glusterd'. Part 2 Change-Id: I1395e14d8d0aa0cc6097e51c64262fb481f36f05 Signed-off-by: Valerii Ponomarov --- tests/functional/glusterd/test_rebalance_new_node.py | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'tests/functional/glusterd/test_rebalance_new_node.py') 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) -- cgit