summaryrefslogtreecommitdiffstats
path: root/tests/functional/glusterd/test_readonly_option_on_volume.py
diff options
context:
space:
mode:
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 064d1ac..d066189 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))