diff options
author | Valerii Ponomarov <vponomar@redhat.com> | 2019-12-11 21:06:59 +0530 |
---|---|---|
committer | Bala Konda Reddy M <bmekala@redhat.com> | 2019-12-18 10:22:20 +0000 |
commit | b1dfa315487c2da399988775e5de39354f686b0c (patch) | |
tree | c5cefcd8749b3af430763e41ea01154608702cc2 /tests/functional/afr/test_afr_cli_no_splitbrain_resolution.py | |
parent | e25ca323395f20232ca2e54ea6c966f91ea54e7e (diff) |
[py2to3] Add py3 support for tests in 'tests/functional/afr'
Change-Id: Ic14be81f1cd42c470d2bb5c15505fc1bc168a393
Signed-off-by: Valerii Ponomarov <kiparis.kh@gmail.com>
Diffstat (limited to 'tests/functional/afr/test_afr_cli_no_splitbrain_resolution.py')
-rw-r--r-- | tests/functional/afr/test_afr_cli_no_splitbrain_resolution.py | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/tests/functional/afr/test_afr_cli_no_splitbrain_resolution.py b/tests/functional/afr/test_afr_cli_no_splitbrain_resolution.py index e9a6681f4..11ca0dd77 100644 --- a/tests/functional/afr/test_afr_cli_no_splitbrain_resolution.py +++ b/tests/functional/afr/test_afr_cli_no_splitbrain_resolution.py @@ -16,7 +16,10 @@ # pylint: disable=too-many-statements, too-many-locals, unused-variable +import sys + from glusto.core import Glusto as g + from glustolibs.gluster.exceptions import ExecutionError from glustolibs.gluster.gluster_base_class import GlusterBaseClass, runs_on from glustolibs.gluster.brick_libs import (get_all_bricks, @@ -41,7 +44,7 @@ class TestSelfHeal(GlusterBaseClass): 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 " @@ -82,7 +85,7 @@ class TestSelfHeal(GlusterBaseClass): raise ExecutionError("Failed to create volume") g.log.info("Successful in cleaning up Volume %s", cls.volname) - GlusterBaseClass.tearDownClass.im_func(cls) + cls.get_super_method(cls, 'tearDownClass')() def test_afr_gfid_heal(self): @@ -115,9 +118,10 @@ class TestSelfHeal(GlusterBaseClass): g.log.info("creating 5 files from mount point") all_mounts_procs = [] for mount_obj in self.mounts: - cmd = ("python %s create_files " - "-f 5 --base-file-name test_file --fixed-file-size 1k %s" - % (self.script_upload_path, mount_obj.mountpoint)) + cmd = ("/usr/bin/env python%d %s create_files -f 5 " + "--base-file-name test_file --fixed-file-size 1k %s" % ( + sys.version_info.major, self.script_upload_path, + mount_obj.mountpoint)) proc = g.run_async(mount_obj.client_system, cmd, user=mount_obj.user) all_mounts_procs.append(proc) @@ -151,9 +155,10 @@ class TestSelfHeal(GlusterBaseClass): g.log.info("creating 5 new files of same name from mount point") all_mounts_procs = [] for mount_obj in self.mounts: - cmd = ("python %s create_files " - "-f 5 --base-file-name test_file --fixed-file-size 10k %s" - % (self.script_upload_path, mount_obj.mountpoint)) + cmd = ("/usr/bin/env python%d %s create_files -f 5 " + "--base-file-name test_file --fixed-file-size 10k %s" % ( + sys.version_info.major, self.script_upload_path, + mount_obj.mountpoint)) proc = g.run_async(mount_obj.client_system, cmd, user=mount_obj.user) all_mounts_procs.append(proc) |