summaryrefslogtreecommitdiffstats
path: root/tests/functional/glusterd/test_readonly_option_on_volume.py
diff options
context:
space:
mode:
authorValerii Ponomarov <vponomar@redhat.com>2019-12-13 21:19:07 +0530
committerBala Konda Reddy M <bmekala@redhat.com>2019-12-18 10:55:39 +0000
commit6a17654e9be3d5fbae9fa25249a7e2c8d892df3a (patch)
tree8812776ebfbb0ec17cbc481fd8a3b2c62aecc644 /tests/functional/glusterd/test_readonly_option_on_volume.py
parent902dc78766d0938f0e40c71c25a4ce2bb10b005d (diff)
[py2to3] Add py3 support in 'tests/functional/glusterd'. Part 2
Change-Id: I1395e14d8d0aa0cc6097e51c64262fb481f36f05 Signed-off-by: Valerii Ponomarov <kiparis.kh@gmail.com>
Diffstat (limited to 'tests/functional/glusterd/test_readonly_option_on_volume.py')
-rw-r--r--tests/functional/glusterd/test_readonly_option_on_volume.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/tests/functional/glusterd/test_readonly_option_on_volume.py b/tests/functional/glusterd/test_readonly_option_on_volume.py
index 064d1ac8a..d066189d4 100644
--- a/tests/functional/glusterd/test_readonly_option_on_volume.py
+++ b/tests/functional/glusterd/test_readonly_option_on_volume.py
@@ -18,7 +18,10 @@
Test read-only option on volumes
"""
+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.misc.misc_libs import upload_scripts
@@ -32,7 +35,7 @@ class TestReadOnlyOptionOnVolume(GlusterBaseClass):
@classmethod
def setUpClass(cls):
cls.counter = 1
- GlusterBaseClass.setUpClass.im_func(cls)
+ cls.get_super_method(cls, 'setUpClass')()
# Uploading file_dir script in all client direcotries
g.log.info("Upload io scripts to clients %s for running IO on "
@@ -53,7 +56,7 @@ class TestReadOnlyOptionOnVolume(GlusterBaseClass):
setUp method for every test
"""
# calling GlusterBaseClass setUp
- GlusterBaseClass.setUp.im_func(self)
+ self.get_super_method(self, 'setUp')()
# Creating Volume
ret = self.setup_volume_and_mount_volume(self.mounts)
@@ -99,12 +102,13 @@ class TestReadOnlyOptionOnVolume(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 2 "
"--max-num-of-dirs 2 "
- "--num-of-files 5 %s" % (self.script_upload_path,
+ "--num-of-files 5 %s" % (sys.version_info.major,
+ self.script_upload_path,
self.counter,
mount_obj.mountpoint))
@@ -136,12 +140,13 @@ class TestReadOnlyOptionOnVolume(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 2 "
"--max-num-of-dirs 2 "
- "--num-of-files 5 %s" % (self.script_upload_path,
+ "--num-of-files 5 %s" % (sys.version_info.major,
+ self.script_upload_path,
self.counter,
mount_obj.mountpoint))