diff options
author | Valerii Ponomarov <vponomar@redhat.com> | 2019-12-17 17:56:19 +0530 |
---|---|---|
committer | Bala Konda Reddy M <bmekala@redhat.com> | 2020-01-02 07:19:55 +0000 |
commit | 62aeeec189f145d521ebf719956a3fbc570af1ee (patch) | |
tree | 3545d970881d415e1934dd7f3ce09700ed54f66c /tests/functional/disperse/test_ec_fops_brickdown.py | |
parent | b1fc01b6006a72e9a9828d64159ce19562a0956b (diff) |
[py2to3] Fix bunch of py3 incompatibilities
Change-Id: I2e85670e50e3dab8727295c34aa6ec4f1326c19d
Signed-off-by: Valerii Ponomarov <kiparis.kh@gmail.com>
Diffstat (limited to 'tests/functional/disperse/test_ec_fops_brickdown.py')
-rw-r--r-- | tests/functional/disperse/test_ec_fops_brickdown.py | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/tests/functional/disperse/test_ec_fops_brickdown.py b/tests/functional/disperse/test_ec_fops_brickdown.py index 111523253..f7cac1fcf 100644 --- a/tests/functional/disperse/test_ec_fops_brickdown.py +++ b/tests/functional/disperse/test_ec_fops_brickdown.py @@ -19,7 +19,11 @@ Test Description: Tests File Operations on an EC volume when redundant bricks are brought down """ + +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.misc.misc_libs import upload_scripts @@ -40,7 +44,7 @@ class TestFopsBrickdown(GlusterBaseClass): @classmethod def setUpClass(cls): # Calling GlusterBaseClass setUpClass - GlusterBaseClass.setUpClass.im_func(cls) + cls.get_super_method(cls, 'setUpClass')() # Upload io scripts for running IO on mounts g.log.info("Upload io scripts to clients %s for running IO on mounts", @@ -56,7 +60,7 @@ class TestFopsBrickdown(GlusterBaseClass): def setUp(self): # Calling GlusterBaseClass setUp - GlusterBaseClass.setUp.im_func(self) + self.get_super_method(self, 'setUp')() # Setup Volume and Mount Volume g.log.info("Starting to Setup Volume and Mount Volume") @@ -81,7 +85,7 @@ class TestFopsBrickdown(GlusterBaseClass): g.log.info("Successful in umounting the volume and Cleanup") # Calling GlusterBaseClass teardown - GlusterBaseClass.tearDown.im_func(self) + self.get_super_method(self, 'tearDown')() def test_fops_ec_brickdown(self): # pylint: disable=too-many-branches,too-many-statements,too-many-locals @@ -261,14 +265,14 @@ class TestFopsBrickdown(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 2 " "--dir-length 10 " "--max-num-of-dirs 5 " - "--num-of-files 5 %s/dir1" % (self.script_upload_path, - count, - mount_obj.mountpoint)) + "--num-of-files 5 %s/dir1" % ( + sys.version_info.major, self.script_upload_path, count, + mount_obj.mountpoint)) proc = g.run_async(mount_obj.client_system, cmd, user=mount_obj.user) all_mounts_procs.append(proc) @@ -300,14 +304,14 @@ class TestFopsBrickdown(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 2 " "--dir-length 10 " "--max-num-of-dirs 5 " - "--num-of-files 5 %s/dir2" % (self.script_upload_path, - count, - mount_obj.mountpoint)) + "--num-of-files 5 %s/dir2" % ( + sys.version_info.major, self.script_upload_path, count, + mount_obj.mountpoint)) proc = g.run_async(mount_obj.client_system, cmd, user=mount_obj.user) all_mounts_procs.append(proc) |