summaryrefslogtreecommitdiffstats
path: root/tests/functional/nfs_ganesha/test_nfs_ganesha_sanity.py
diff options
context:
space:
mode:
authorValerii Ponomarov <vponomar@redhat.com>2019-12-09 19:36:23 +0530
committerBala Konda Reddy M <bmekala@redhat.com>2019-12-18 10:11:45 +0000
commitbdc29bccfda390fd3cc2953b43a8653f7653c56f (patch)
treebadda443fc5bf3027658d80dd604d2eaf0830546 /tests/functional/nfs_ganesha/test_nfs_ganesha_sanity.py
parent0eaf8c8edf16e99bf9f2dea22ced6655ef99587b (diff)
[py2to3] Add py3 support in 'tests/functional/nfs_ganesha'
Change-Id: I7a76e0c2e491caffd7ba1b648b47c4c6a687c89a Signed-off-by: Valerii Ponomarov <kiparis.kh@gmail.com>
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 9ee246f..e2a9887 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)