summaryrefslogtreecommitdiffstats
path: root/tests/functional/afr/test_client_side_quorum_with_auto_option_overwrite_fixed.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_client_side_quorum_with_auto_option_overwrite_fixed.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_client_side_quorum_with_auto_option_overwrite_fixed.py')
-rwxr-xr-xtests/functional/afr/test_client_side_quorum_with_auto_option_overwrite_fixed.py23
1 files changed, 14 insertions, 9 deletions
diff --git a/tests/functional/afr/test_client_side_quorum_with_auto_option_overwrite_fixed.py b/tests/functional/afr/test_client_side_quorum_with_auto_option_overwrite_fixed.py
index 77884bd4d..0dab6d09a 100755
--- a/tests/functional/afr/test_client_side_quorum_with_auto_option_overwrite_fixed.py
+++ b/tests/functional/afr/test_client_side_quorum_with_auto_option_overwrite_fixed.py
@@ -18,7 +18,10 @@
Test Cases in this module tests the client side quorum.
"""
+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.volume_libs import (
@@ -43,7 +46,7 @@ class ClientSideQuorumTests(GlusterBaseClass):
"""
# 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 "
@@ -60,7 +63,7 @@ class ClientSideQuorumTests(GlusterBaseClass):
"""
# 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 %s", self.volname)
@@ -82,7 +85,7 @@ class ClientSideQuorumTests(GlusterBaseClass):
g.log.info("Successful in Unmount Volume and Cleanup Volume")
# Calling GlusterBaseClass tearDown
- GlusterBaseClass.tearDown.im_func(self)
+ self.get_super_method(self, 'tearDown')()
def test_client_side_quorum_with_auto_option_overwrite_fixed(self):
"""
@@ -150,9 +153,10 @@ class ClientSideQuorumTests(GlusterBaseClass):
# create files
g.log.info("Starting IO on all mounts...")
g.log.info("mounts: %s", self.mounts)
- cmd = ("python %s create_files "
- "-f 10 --base-file-name file %s"
- % (self.script_upload_path, self.mounts[0].mountpoint))
+ cmd = ("/usr/bin/env python%d %s create_files "
+ "-f 10 --base-file-name file %s" % (
+ sys.version_info.major, self.script_upload_path,
+ self.mounts[0].mountpoint))
ret, _, err = g.run(self.mounts[0].client_system, cmd)
self.assertFalse(ret, "IO failed on %s with '%s'"
% (self.mounts[0].client_system, err))
@@ -181,9 +185,10 @@ class ClientSideQuorumTests(GlusterBaseClass):
# create files
g.log.info("Starting IO on all mounts...")
g.log.info("mounts: %s", self.mounts)
- cmd = ("python %s create_files "
- "-f 10 --base-file-name second_file %s"
- % (self.script_upload_path, self.mounts[0].mountpoint))
+ cmd = ("/usr/bin/env python%d %s create_files "
+ "-f 10 --base-file-name second_file %s" % (
+ sys.version_info.major, self.script_upload_path,
+ self.mounts[0].mountpoint))
ret, _, err = g.run(self.mounts[0].client_system, cmd)
self.assertFalse(ret, "IO failed on %s with '%s'"
% (self.mounts[0].client_system, err))