summaryrefslogtreecommitdiffstats
path: root/tests/functional/nfs_ganesha/test_nfs_ganesha_sanity.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/nfs_ganesha/test_nfs_ganesha_sanity.py')
-rwxr-xr-xtests/functional/nfs_ganesha/test_nfs_ganesha_sanity.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/tests/functional/nfs_ganesha/test_nfs_ganesha_sanity.py b/tests/functional/nfs_ganesha/test_nfs_ganesha_sanity.py
index 9ee246fd8..e2a98876a 100755
--- a/tests/functional/nfs_ganesha/test_nfs_ganesha_sanity.py
+++ b/tests/functional/nfs_ganesha/test_nfs_ganesha_sanity.py
@@ -17,7 +17,11 @@
""" Description:
Test Cases in this module test NFS-Ganesha Sanity.
"""
+
+import sys
+
from glusto.core import Glusto as g
+
from glustolibs.gluster.gluster_base_class import runs_on
from glustolibs.gluster.nfs_ganesha_libs import (
NfsGaneshaClusterSetupClass)
@@ -44,7 +48,7 @@ class TestNfsGaneshaSanity(NfsGaneshaClusterSetupClass):
Setup nfs-ganesha if not exists.
Upload IO scripts to clients
"""
- NfsGaneshaClusterSetupClass.setUpClass.im_func(cls)
+ cls.get_super_method(cls, 'setUpClass')()
# Setup nfs-ganesha if not exists.
ret = cls.setup_nfs_ganesha()
@@ -105,13 +109,14 @@ class TestNfsGaneshaSanity(NfsGaneshaClusterSetupClass):
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 10 "
"--max-num-of-dirs 5 "
- "--num-of-files 5 %s" % (self.script_upload_path, count,
- mount_obj.mountpoint))
+ "--num-of-files 5 %s" % (
+ sys.version_info.major, self.script_upload_path, count,
+ mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
all_mounts_procs.append(proc)
@@ -236,6 +241,5 @@ class TestNfsGaneshaSanity(NfsGaneshaClusterSetupClass):
@classmethod
def tearDownClass(cls):
- (NfsGaneshaClusterSetupClass.
- tearDownClass.
- im_func(cls, delete_nfs_ganesha_cluster=False))
+ cls.get_super_method(cls, 'tearDownClass')(
+ delete_nfs_ganesha_cluster=False)