summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorValerii Ponomarov <vponomar@redhat.com>2019-12-04 02:12:49 +0530
committerBala Konda Reddy M <bmekala@redhat.com>2019-12-12 11:33:21 +0000
commita3ea01c342573a02f7717960affa51ed141d7737 (patch)
tree1714b4051222746e5691bcc52cc923fe966f02f3
parenta7b8abe275c123a4ac980f414ce9ac284d15b3c6 (diff)
[py2to3] Add py3 support for tests in 'tests/functional/quota'
Change-Id: I39ed09ee91a345daae7bb675184a8a30d48575fa Signed-off-by: Valerii Ponomarov <kiparis.kh@gmail.com>
-rw-r--r--tests/functional/quota/list_path_values.py4
-rwxr-xr-xtests/functional/quota/test_alert_time_out.py7
-rw-r--r--tests/functional/quota/test_deem_statfs.py4
-rw-r--r--tests/functional/quota/test_deem_statfs_quotad.py4
-rw-r--r--tests/functional/quota/test_limit_usage_deep_dir.py15
-rw-r--r--tests/functional/quota/test_multi_value_limit.py4
-rw-r--r--tests/functional/quota/test_negative_quota.py4
-rw-r--r--tests/functional/quota/test_non_existent_dir.py6
-rw-r--r--tests/functional/quota/test_quota_add_brick.py4
-rw-r--r--tests/functional/quota/test_quota_file_larger_than_limit.py4
-rwxr-xr-xtests/functional/quota/test_quota_limit_dir_breadth.py21
-rw-r--r--tests/functional/quota/test_quota_no_dir.py4
-rw-r--r--tests/functional/quota/test_quota_rebalance_heal.py23
-rwxr-xr-xtests/functional/quota/test_quota_renamed_dir.py4
-rw-r--r--tests/functional/quota/test_quota_single_brick_volume.py15
-rw-r--r--tests/functional/quota/test_quota_symlink_limit.py4
-rw-r--r--tests/functional/quota/test_quota_unique_soft_limit.py4
-rw-r--r--tests/functional/quota/test_quota_volume_subdir_limits.py4
18 files changed, 74 insertions, 61 deletions
diff --git a/tests/functional/quota/list_path_values.py b/tests/functional/quota/list_path_values.py
index 2923704..08ccf24 100644
--- a/tests/functional/quota/list_path_values.py
+++ b/tests/functional/quota/list_path_values.py
@@ -41,7 +41,7 @@ class QuotaListPathValues(GlusterBaseClass):
"""
# calling GlusterBaseClass setUpClass
- GlusterBaseClass.setUpClass.im_func(cls)
+ cls.get_super_method(cls, 'setUpClass')()
# Setup Volume and Mount Volume
g.log.info("Starting to Setup and Mount Volume %s",
@@ -66,7 +66,7 @@ class QuotaListPathValues(GlusterBaseClass):
g.log.info("Successful in Unmount Volume and Cleanup Volume")
# calling GlusterBaseClass tearDownClass
- GlusterBaseClass.tearDownClass.im_func(cls)
+ cls.get_super_method(cls, 'tearDownClass')()
def test_quota_list_path_values(self):
"""
diff --git a/tests/functional/quota/test_alert_time_out.py b/tests/functional/quota/test_alert_time_out.py
index 5619105..1eaa825 100755
--- a/tests/functional/quota/test_alert_time_out.py
+++ b/tests/functional/quota/test_alert_time_out.py
@@ -16,7 +16,6 @@
import time
import random
-import string
from glusto.core import Glusto as g
from glustolibs.gluster.gluster_base_class import GlusterBaseClass, runs_on
from glustolibs.gluster.lib_utils import (search_pattern_in_file,
@@ -45,7 +44,7 @@ class QuotaTimeOut(GlusterBaseClass):
which is used in tests
"""
# Calling GlusterBaseClass setUpClass
- GlusterBaseClass.setUpClass.im_func(cls)
+ cls.get_super_method(cls, 'setUpClass')()
# Setup Volume and Mount Volume
g.log.info("Starting to Setup and Mount Volume %s",
@@ -69,7 +68,7 @@ class QuotaTimeOut(GlusterBaseClass):
g.log.info("Successful in Unmount Volume and Cleanup Volume")
# Calling GlusterBaseClass tearDownClass
- GlusterBaseClass.tearDownClass.im_func(cls)
+ cls.get_super_method(cls, 'tearDownClass')()
def test_alert_time_out(self):
"""
@@ -163,7 +162,7 @@ class QuotaTimeOut(GlusterBaseClass):
# Get the brick log file path for a random node
bricks = get_all_bricks(self.mnode, self.volname)
selected_node, brick_path = random.choice(bricks[0:6]).split(':')
- brickpath = string.replace(brick_path, '/', '-')
+ brickpath = str.replace(brick_path, '/', '-')
brickpathfinal = brickpath[1:]
brick_log = "/var/log/glusterfs/bricks/%s.log" % brickpathfinal
diff --git a/tests/functional/quota/test_deem_statfs.py b/tests/functional/quota/test_deem_statfs.py
index d5050f9..5da70d8 100644
--- a/tests/functional/quota/test_deem_statfs.py
+++ b/tests/functional/quota/test_deem_statfs.py
@@ -37,7 +37,7 @@ class QuotaStatvfs(GlusterBaseClass):
"""
# calling GlusterBaseClass setUpClass
- GlusterBaseClass.setUpClass.im_func(cls)
+ cls.get_super_method(cls, 'setUpClass')()
# Setup Volume and Mount Volume
g.log.info("Starting to Setup and Mount Volume %s",
@@ -62,7 +62,7 @@ class QuotaStatvfs(GlusterBaseClass):
g.log.info("Successful in Unmount Volume and Cleanup Volume")
# calling GlusterBaseClass tearDownClass
- GlusterBaseClass.tearDownClass.im_func(cls)
+ cls.get_super_method(cls, 'tearDownClass')()
def test_quota_statvfs(self):
"""
diff --git a/tests/functional/quota/test_deem_statfs_quotad.py b/tests/functional/quota/test_deem_statfs_quotad.py
index cf29489..7773d4d 100644
--- a/tests/functional/quota/test_deem_statfs_quotad.py
+++ b/tests/functional/quota/test_deem_statfs_quotad.py
@@ -33,7 +33,7 @@ class QuotaDeemStatfsAndQuotad(GlusterBaseClass):
"""
setup volume and initialize necessary variables
"""
- GlusterBaseClass.setUpClass.im_func(cls)
+ cls.get_super_method(cls, 'setUpClass')()
g.log.info("Starting to Setup Volume")
ret = cls.setup_volume()
if not ret:
@@ -53,7 +53,7 @@ class QuotaDeemStatfsAndQuotad(GlusterBaseClass):
g.log.info("Successful in Cleanup Volume")
# calling GlusterBaseClass tearDownClass
- GlusterBaseClass.tearDownClass.im_func(cls)
+ cls.get_super_method(cls, 'tearDownClass')()
def test_quota_deem_statfs_quotad(self):
"""
diff --git a/tests/functional/quota/test_limit_usage_deep_dir.py b/tests/functional/quota/test_limit_usage_deep_dir.py
index 974249c..96cdd14 100644
--- a/tests/functional/quota/test_limit_usage_deep_dir.py
+++ b/tests/functional/quota/test_limit_usage_deep_dir.py
@@ -15,6 +15,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import random
+import sys
+
from glusto.core import Glusto as g
from glustolibs.gluster.gluster_base_class import (GlusterBaseClass,
runs_on)
@@ -39,7 +41,7 @@ class LimitUsageDeepDir(GlusterBaseClass):
@classmethod
def setUpClass(cls):
# Calling GlusterBaseClass setUpClass
- 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",
@@ -57,7 +59,7 @@ class LimitUsageDeepDir(GlusterBaseClass):
def setUp(self):
# Calling GlusterBaseClass setUp
- GlusterBaseClass.setUp.im_func(self)
+ self.get_super_method(self, 'setUp')()
self.all_mounts_procs = []
@@ -80,7 +82,7 @@ class LimitUsageDeepDir(GlusterBaseClass):
g.log.info("Successful in umounting the volume and Cleanup")
# Calling GlusterBaseClass teardown
- GlusterBaseClass.tearDown.im_func(self)
+ self.get_super_method(self, 'tearDown')()
def test_limit_usage_deep_dir(self):
# pylint: disable=too-many-statements
@@ -180,9 +182,10 @@ class LimitUsageDeepDir(GlusterBaseClass):
# Data creation
# Creates one file of rand[0] size in each dir
rand = random.sample([1, 10, 512], 1)
- cmd = ("python %s create_files --fixed-file-size %sk %s/%s"
- % (self.script_upload_path, rand[0],
- mount_object.mountpoint, dir_list[0]))
+ cmd = ("/usr/bin/env python%d %s create_files "
+ "--fixed-file-size %sk %s/%s" % (
+ sys.version_info.major, self.script_upload_path,
+ rand[0], mount_object.mountpoint, dir_list[0]))
ret, _, _ = g.run(mount_object.client_system, cmd)
self.assertFalse(ret, "Failed to create files")
diff --git a/tests/functional/quota/test_multi_value_limit.py b/tests/functional/quota/test_multi_value_limit.py
index 3991c61..046f0f6 100644
--- a/tests/functional/quota/test_multi_value_limit.py
+++ b/tests/functional/quota/test_multi_value_limit.py
@@ -39,7 +39,7 @@ class QuotaMultiValueLimits(GlusterBaseClass):
"""
# calling GlusterBaseClass setUpClass
- GlusterBaseClass.setUpClass.im_func(cls)
+ cls.get_super_method(cls, 'setUpClass')()
# Setup Volume and Mount Volume
g.log.info("Starting to Setup and Mount Volume %s",
@@ -64,7 +64,7 @@ class QuotaMultiValueLimits(GlusterBaseClass):
g.log.info("Successful in Unmount Volume and Cleanup Volume")
# calling GlusterBaseClass tearDownClass
- GlusterBaseClass.tearDownClass.im_func(cls)
+ cls.get_super_method(cls, 'tearDownClass')()
def test_quota_multi_value_limits(self):
# pylint: disable=too-many-statements
diff --git a/tests/functional/quota/test_negative_quota.py b/tests/functional/quota/test_negative_quota.py
index d420dd1..aab912e 100644
--- a/tests/functional/quota/test_negative_quota.py
+++ b/tests/functional/quota/test_negative_quota.py
@@ -34,7 +34,7 @@ class TestNegativeQuota(GlusterBaseClass):
def setUp(self):
""" creates the volume and mount it"""
- GlusterBaseClass.setUp.im_func(self)
+ self.get_super_method(self, 'setUp')()
g.log.info("Creating the vol %s and mount it", self.volname)
ret = self.setup_volume_and_mount_volume(mounts=self.mounts)
if not ret:
@@ -49,7 +49,7 @@ class TestNegativeQuota(GlusterBaseClass):
if not ret:
raise ExecutionError("Failed to delete the "
"volume" % (self.volname))
- GlusterBaseClass.tearDown.im_func(self)
+ self.get_super_method(self, 'tearDown')()
def test_negative_quota_enable(self):
""" This testcase will enable quota by giving negative inputs or
diff --git a/tests/functional/quota/test_non_existent_dir.py b/tests/functional/quota/test_non_existent_dir.py
index 380576a..34a11cd 100644
--- a/tests/functional/quota/test_non_existent_dir.py
+++ b/tests/functional/quota/test_non_existent_dir.py
@@ -28,12 +28,12 @@ from glustolibs.gluster.exceptions import ExecutionError
class QuotaNonExistentDir(GlusterBaseClass):
@classmethod
def setUpClass(cls):
- GlusterBaseClass.setUpClass.im_func(cls)
+ cls.get_super_method(cls, 'setUpClass')()
g.log.info("Starting %s ", cls.__name__)
def setUp(self):
# SettingUp volume and Mounting the volume
- GlusterBaseClass.setUp.im_func(self)
+ self.get_super_method(self, 'setUp')()
# Setting up the volume
ret = self.setup_volume_and_mount_volume(mounts=self.mounts)
@@ -78,4 +78,4 @@ class QuotaNonExistentDir(GlusterBaseClass):
g.log.info("Successful in umounting the volume and Cleanup")
# Calling GlusterBaseClass tearDown
- GlusterBaseClass.tearDown.im_func(self)
+ self.get_super_method(self, 'tearDown')()
diff --git a/tests/functional/quota/test_quota_add_brick.py b/tests/functional/quota/test_quota_add_brick.py
index 1078cef..7a08d7d 100644
--- a/tests/functional/quota/test_quota_add_brick.py
+++ b/tests/functional/quota/test_quota_add_brick.py
@@ -34,7 +34,7 @@ class QuotaAddBrick(GlusterBaseClass):
def setUp(self):
# Calling GlusterBaseClass setUp
- GlusterBaseClass.setUp.im_func(self)
+ self.get_super_method(self, 'setUp')()
self.all_mounts_procs = []
@@ -57,7 +57,7 @@ class QuotaAddBrick(GlusterBaseClass):
g.log.info("Successful in umounting the volume and Cleanup")
# Calling GlusterBaseClass teardown
- GlusterBaseClass.tearDown.im_func(self)
+ self.get_super_method(self, 'tearDown')()
def test_quota_add_brick(self):
"""
diff --git a/tests/functional/quota/test_quota_file_larger_than_limit.py b/tests/functional/quota/test_quota_file_larger_than_limit.py
index d354f71..4bee23b 100644
--- a/tests/functional/quota/test_quota_file_larger_than_limit.py
+++ b/tests/functional/quota/test_quota_file_larger_than_limit.py
@@ -39,7 +39,7 @@ class QuotaFileLargerThanLimit(GlusterBaseClass):
which is used in tests
"""
# calling GlusterBaseClass setUpClass
- GlusterBaseClass.setUpClass.im_func(cls)
+ cls.get_super_method(cls, 'setUpClass')()
# Setup Volume and Mount Volume
g.log.info("Starting to Setup and Mount Volume %s",
@@ -63,7 +63,7 @@ class QuotaFileLargerThanLimit(GlusterBaseClass):
g.log.info("Successful in Unmount Volume and Cleanup Volume")
# calling GlusterBaseClass tearDownClass
- GlusterBaseClass.tearDownClass.im_func(cls)
+ cls.get_super_method(cls, 'tearDownClass')()
def test_quota_file_larger_than_limit(self):
# pylint: disable=too-many-statements
diff --git a/tests/functional/quota/test_quota_limit_dir_breadth.py b/tests/functional/quota/test_quota_limit_dir_breadth.py
index e9c79cc..8141665 100755
--- a/tests/functional/quota/test_quota_limit_dir_breadth.py
+++ b/tests/functional/quota/test_quota_limit_dir_breadth.py
@@ -14,7 +14,10 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+import sys
+
from glusto.core import Glusto as g
+
from glustolibs.gluster.gluster_base_class import (GlusterBaseClass,
runs_on)
from glustolibs.gluster.quota_ops import (quota_enable, quota_limit_usage)
@@ -32,7 +35,7 @@ class QuotaLimitDirBreadth(GlusterBaseClass):
@classmethod
def setUpClass(cls):
# Calling GlusterBaseClass setUpClass
- 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",
@@ -50,7 +53,7 @@ class QuotaLimitDirBreadth(GlusterBaseClass):
def setUp(self):
# Calling GlusterBaseClass setUp
- GlusterBaseClass.setUp.im_func(self)
+ self.get_super_method(self, 'setUp')()
self.all_mounts_procs = []
@@ -73,7 +76,7 @@ class QuotaLimitDirBreadth(GlusterBaseClass):
g.log.info("Successful in umounting the volume and Cleanup")
# Calling GlusterBaseClass teardown
- GlusterBaseClass.tearDown.im_func(self)
+ self.get_super_method(self, 'tearDown')()
def test_quota_limit_dir_breadth(self):
"""
@@ -101,8 +104,8 @@ class QuotaLimitDirBreadth(GlusterBaseClass):
g.log.info("Creating Directories on %s:%s",
client, mount_dir)
- cmd = ('python %s create_deep_dir -d 0 -l 10 %s'
- % (self.script_upload_path, mount_dir))
+ cmd = "/usr/bin/env python%d %s create_deep_dir -d 0 -l 10 %s" % (
+ sys.version_info.major, self.script_upload_path, mount_dir)
proc = g.run_async(client, cmd, user=mount_obj.user)
self.all_mounts_procs.append(proc)
@@ -150,10 +153,10 @@ class QuotaLimitDirBreadth(GlusterBaseClass):
g.log.info("Creating Files on %s:%s", client, mount_dir)
for i in range(1, 11):
dir_name = "/user" + str(i)
- cmd = ("python %s create_files -f 10 --fixed-file-size 1M "
- "%s/%s"
- % (self.script_upload_path, mount_dir,
- dir_name))
+ cmd = ("/usr/bin/env python%d %s create_files -f 10 "
+ "--fixed-file-size 1M %s/%s" % (
+ sys.version_info.major, self.script_upload_path,
+ mount_dir, dir_name))
ret, _, _ = g.run(client, cmd)
self.assertFalse(ret, "Failed to create files in %s"
diff --git a/tests/functional/quota/test_quota_no_dir.py b/tests/functional/quota/test_quota_no_dir.py
index 8bc381c..2e6a6af 100644
--- a/tests/functional/quota/test_quota_no_dir.py
+++ b/tests/functional/quota/test_quota_no_dir.py
@@ -34,7 +34,7 @@ from glustolibs.gluster.volume_libs import (
class QuotaNoDir(GlusterBaseClass):
def setUp(self):
# SettingUp volume and Mounting the volume
- GlusterBaseClass.setUp.im_func(self)
+ self.get_super_method(self, 'setUp')()
g.log.info("Creating volume %s", (self.volname))
# Setting up the volume
@@ -146,4 +146,4 @@ class QuotaNoDir(GlusterBaseClass):
g.log.info("Successful in umounting the volume and Cleanup")
# Calling GlusterBaseClass tearDown
- GlusterBaseClass.tearDown.im_func(self)
+ self.get_super_method(self, 'tearDown')()
diff --git a/tests/functional/quota/test_quota_rebalance_heal.py b/tests/functional/quota/test_quota_rebalance_heal.py
index 4716f2f..c56e92d 100644
--- a/tests/functional/quota/test_quota_rebalance_heal.py
+++ b/tests/functional/quota/test_quota_rebalance_heal.py
@@ -14,8 +14,11 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+import sys
from time import sleep
+
from glusto.core import Glusto as g
+
from glustolibs.gluster.gluster_base_class import (GlusterBaseClass,
runs_on)
from glustolibs.gluster.quota_ops import (quota_enable,
@@ -43,7 +46,7 @@ class TestQuotaRebalanceHeal(GlusterBaseClass):
@classmethod
def setUpClass(cls):
# Calling GlusterBaseClass setUpClass
- 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",
@@ -61,7 +64,7 @@ class TestQuotaRebalanceHeal(GlusterBaseClass):
def setUp(self):
# Calling GlusterBaseClass setUp
- GlusterBaseClass.setUp.im_func(self)
+ self.get_super_method(self, 'setUp')()
self.all_mounts_procs = []
@@ -84,7 +87,7 @@ class TestQuotaRebalanceHeal(GlusterBaseClass):
g.log.info("Successful in umounting the volume and Cleanup")
# Calling GlusterBaseClass teardown
- GlusterBaseClass.tearDown.im_func(self)
+ self.get_super_method(self, 'tearDown')()
def test_quota_rebalance_heal(self):
"""
@@ -123,9 +126,10 @@ class TestQuotaRebalanceHeal(GlusterBaseClass):
for mount_object in self.mounts:
g.log.info("Creating Directories on %s:%s",
mount_object.client_system, mount_object.mountpoint)
- cmd = ('python %s create_deep_dirs_with_files -d 0 -f 1024 -l 4'
- ' --fixed-file-size 1k %s'
- % (self.script_upload_path, mount_object.mountpoint))
+ cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files -d 0 "
+ "-f 1024 -l 4 --fixed-file-size 1k %s" % (
+ sys.version_info.major, self.script_upload_path,
+ mount_object.mountpoint))
proc = g.run_async(mount_object.client_system, cmd,
user=mount_object.user)
@@ -182,9 +186,10 @@ class TestQuotaRebalanceHeal(GlusterBaseClass):
# Do some more IO and check if hard limit is honoured
all_mounts_procs = []
for mount_object in self.mounts:
- cmd = ("python %s create_files "
- "-f 100 --base-file-name file %s"
- % (self.script_upload_path, mount_object.mountpoint))
+ cmd = ("/usr/bin/env python%d %s create_files "
+ "-f 100 --base-file-name file %s" % (
+ sys.version_info.major, self.script_upload_path,
+ mount_object.mountpoint))
proc = g.run_async(mount_object.client_system, cmd,
user=mount_object.user)
all_mounts_procs.append(proc)
diff --git a/tests/functional/quota/test_quota_renamed_dir.py b/tests/functional/quota/test_quota_renamed_dir.py
index 9f59d5e..d8b6aca 100755
--- a/tests/functional/quota/test_quota_renamed_dir.py
+++ b/tests/functional/quota/test_quota_renamed_dir.py
@@ -36,7 +36,7 @@ class TestQuotaRenamedDir(GlusterBaseClass):
which is used in tests
"""
# calling GlusterBaseClass setUpClass
- GlusterBaseClass.setUpClass.im_func(cls)
+ cls.get_super_method(cls, 'setUpClass')()
# Setup Volume and Mount Volume
g.log.info("Starting to Setup and Mount Volume %s",
@@ -60,7 +60,7 @@ class TestQuotaRenamedDir(GlusterBaseClass):
g.log.info("Successful in Unmount Volume and Cleanup Volume")
# calling GlusterBaseClass tearDownClass
- GlusterBaseClass.tearDownClass.im_func(cls)
+ cls.get_super_method(cls, 'tearDownClass')()
def test_quota_with_renamed_dir(self):
"""
diff --git a/tests/functional/quota/test_quota_single_brick_volume.py b/tests/functional/quota/test_quota_single_brick_volume.py
index d2ca8d6..c126a22 100644
--- a/tests/functional/quota/test_quota_single_brick_volume.py
+++ b/tests/functional/quota/test_quota_single_brick_volume.py
@@ -14,7 +14,10 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+import sys
+
from glusto.core import Glusto as g
+
from glustolibs.gluster.gluster_base_class import (GlusterBaseClass,
runs_on)
from glustolibs.gluster.quota_ops import (quota_enable,
@@ -37,7 +40,7 @@ class QuotaListPathValues(GlusterBaseClass):
"""
# calling GlusterBaseClass setUpClass
- 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",
@@ -81,7 +84,7 @@ class QuotaListPathValues(GlusterBaseClass):
g.log.info("Successful in Unmount Volume and Cleanup Volume")
# calling GlusterBaseClass tearDownClass
- GlusterBaseClass.tearDownClass.im_func(cls)
+ cls.get_super_method(cls, 'tearDownClass')()
def test_quota_single_brick_volume(self):
"""
@@ -121,14 +124,14 @@ class QuotaListPathValues(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 20 "
"--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)
diff --git a/tests/functional/quota/test_quota_symlink_limit.py b/tests/functional/quota/test_quota_symlink_limit.py
index 75ae83c..165640e 100644
--- a/tests/functional/quota/test_quota_symlink_limit.py
+++ b/tests/functional/quota/test_quota_symlink_limit.py
@@ -34,7 +34,7 @@ class QuotaUniqueSoftLimit(GlusterBaseClass):
which is used in tests
"""
# Calling GlusterBaseClass setUpClass
- GlusterBaseClass.setUpClass.im_func(cls)
+ cls.get_super_method(cls, 'setUpClass')()
# Setup Volume and Mount Volume
g.log.info("Starting to Setup and Mount Volume %s",
@@ -58,7 +58,7 @@ class QuotaUniqueSoftLimit(GlusterBaseClass):
g.log.info("Successful in Unmount Volume and Cleanup Volume")
# Calling GlusterBaseClass tearDownClass
- GlusterBaseClass.tearDownClass.im_func(cls)
+ cls.get_super_method(cls, 'tearDownClass')()
def test_quota_symlink_limit(self):
"""
diff --git a/tests/functional/quota/test_quota_unique_soft_limit.py b/tests/functional/quota/test_quota_unique_soft_limit.py
index b175f12..ad7d3e4 100644
--- a/tests/functional/quota/test_quota_unique_soft_limit.py
+++ b/tests/functional/quota/test_quota_unique_soft_limit.py
@@ -37,7 +37,7 @@ class QuotaUniqueSoftLimit(GlusterBaseClass):
which is used in tests
"""
# Calling GlusterBaseClass setUpClass
- GlusterBaseClass.setUpClass.im_func(cls)
+ cls.get_super_method(cls, 'setUpClass')()
# Setup Volume and Mount Volume
g.log.info("Starting to Setup and Mount Volume %s",
@@ -61,7 +61,7 @@ class QuotaUniqueSoftLimit(GlusterBaseClass):
g.log.info("Successful in Unmount Volume and Cleanup Volume")
# Calling GlusterBaseClass tearDownClass
- GlusterBaseClass.tearDownClass.im_func(cls)
+ cls.get_super_method(cls, 'tearDownClass')()
def test_quota_unique_soft_limit(self):
"""
diff --git a/tests/functional/quota/test_quota_volume_subdir_limits.py b/tests/functional/quota/test_quota_volume_subdir_limits.py
index 7e4245c..4da2ae8 100644
--- a/tests/functional/quota/test_quota_volume_subdir_limits.py
+++ b/tests/functional/quota/test_quota_volume_subdir_limits.py
@@ -38,7 +38,7 @@ class QuotaVolumeAndSubdirLimits(GlusterBaseClass):
"""
# calling GlusterBaseClass setUpClass
- GlusterBaseClass.setUpClass.im_func(cls)
+ cls.get_super_method(cls, 'setUpClass')()
# Setup Volume and Mount Volume
g.log.info("Starting to Setup and Mount Volume %s",
@@ -63,7 +63,7 @@ class QuotaVolumeAndSubdirLimits(GlusterBaseClass):
g.log.info("Successful in Unmount Volume and Cleanup Volume")
# calling GlusterBaseClass tearDownClass
- GlusterBaseClass.tearDownClass.im_func(cls)
+ cls.get_super_method(cls, 'tearDownClass')()
def test_quota_volume_subdir_limits(self):
"""