summaryrefslogtreecommitdiffstats
path: root/tests/functional/snapshot/test_uss_snap_active_deactive.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/snapshot/test_uss_snap_active_deactive.py')
-rw-r--r--tests/functional/snapshot/test_uss_snap_active_deactive.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/functional/snapshot/test_uss_snap_active_deactive.py b/tests/functional/snapshot/test_uss_snap_active_deactive.py
index 93c0231..aae1fe3 100644
--- a/tests/functional/snapshot/test_uss_snap_active_deactive.py
+++ b/tests/functional/snapshot/test_uss_snap_active_deactive.py
@@ -21,7 +21,10 @@ Description:
snap should not.
"""
+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.io.utils import (validate_io_procs,
@@ -42,7 +45,7 @@ class SnapUssActiveD(GlusterBaseClass):
@classmethod
def setUpClass(cls):
- 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 "
"mounts", cls.clients)
@@ -59,7 +62,7 @@ class SnapUssActiveD(GlusterBaseClass):
def setUp(self):
# SettingUp and Mounting the volume
- GlusterBaseClass.setUpClass.im_func(self)
+ self.get_super_method(self, 'setUp')()
g.log.info("Starting to SetUp Volume and mount volume")
ret = self.setup_volume_and_mount_volume(mounts=self.mounts)
if not ret:
@@ -121,14 +124,14 @@ class SnapUssActiveD(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 2 %s" % (self.script_upload_path,
- self.counter,
- mount_obj.mountpoint))
+ "--num-of-files 2 %s" % (
+ sys.version_info.major, self.script_upload_path,
+ self.counter, mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)