summaryrefslogtreecommitdiffstats
path: root/tests/functional/afr/test_afr_cli_gfid_splitbrain.py
diff options
context:
space:
mode:
authorValerii Ponomarov <vponomar@redhat.com>2019-12-11 21:06:59 +0530
committerBala Konda Reddy M <bmekala@redhat.com>2019-12-18 10:22:20 +0000
commitb1dfa315487c2da399988775e5de39354f686b0c (patch)
treec5cefcd8749b3af430763e41ea01154608702cc2 /tests/functional/afr/test_afr_cli_gfid_splitbrain.py
parente25ca323395f20232ca2e54ea6c966f91ea54e7e (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_gfid_splitbrain.py')
-rw-r--r--tests/functional/afr/test_afr_cli_gfid_splitbrain.py21
1 files changed, 13 insertions, 8 deletions
diff --git a/tests/functional/afr/test_afr_cli_gfid_splitbrain.py b/tests/functional/afr/test_afr_cli_gfid_splitbrain.py
index ec3f803e9..324f47f6a 100644
--- a/tests/functional/afr/test_afr_cli_gfid_splitbrain.py
+++ b/tests/functional/afr/test_afr_cli_gfid_splitbrain.py
@@ -16,7 +16,10 @@
# pylint: disable=too-many-statements, too-many-locals
+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,
@@ -38,7 +41,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 "
@@ -79,7 +82,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):
@@ -111,9 +114,10 @@ class TestSelfHeal(GlusterBaseClass):
g.log.info("creating a file from mount point")
all_mounts_procs = []
- cmd = ("python %s create_files "
- "-f 1 --base-file-name test_file --fixed-file-size 1k %s"
- % (self.script_upload_path, self.mounts[0].mountpoint))
+ cmd = ("/usr/bin/env python%d %s create_files "
+ "-f 1 --base-file-name test_file --fixed-file-size 1k %s" % (
+ sys.version_info.major, self.script_upload_path,
+ self.mounts[0].mountpoint))
proc = g.run_async(self.mounts[0].client_system, cmd)
all_mounts_procs.append(proc)
# Validate I/O
@@ -137,9 +141,10 @@ class TestSelfHeal(GlusterBaseClass):
g.log.info("creating a new file of same name from mount point")
all_mounts_procs = []
- cmd = ("python %s create_files "
- "-f 1 --base-file-name test_file --fixed-file-size 1k %s"
- % (self.script_upload_path, self.mounts[0].mountpoint))
+ cmd = ("/usr/bin/env python%d %s create_files "
+ "-f 1 --base-file-name test_file --fixed-file-size 1k %s" % (
+ sys.version_info.major, self.script_upload_path,
+ self.mounts[0].mountpoint))
proc = g.run_async(self.mounts[0].client_system, cmd)
all_mounts_procs.append(proc)
# Validate I/O