summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSri Vignesh <sselvan@redhat.com>2020-05-11 12:42:48 +0530
committerBala Konda Reddy M <bala12352@gmail.com>2020-05-11 14:44:09 +0000
commit42ac4877cdba48c7ef95b0fdf1e6d708b8c9856d (patch)
tree3c35704e0c7d11f5ef719116cfe28f16c1d7b200 /tests
parent0f2f4e2c76c3a9192fde780b9da076a4eb797759 (diff)
[TestFix][Quota] Moving test steps from teardown class to teardown
Move cases from teardown class to teardown in quota Change-Id: Ia20fe9bef09842f891f0f27ab711a1ef4c9f6f39 Signed-off-by: Sri Vignesh <sselvan@redhat.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/functional/quota/test_alert_time_out.py21
-rw-r--r--tests/functional/quota/test_deem_statfs.py20
-rw-r--r--tests/functional/quota/test_deem_statfs_quotad.py23
-rw-r--r--tests/functional/quota/test_multi_value_limit.py20
-rw-r--r--tests/functional/quota/test_quota_file_larger_than_limit.py21
-rwxr-xr-xtests/functional/quota/test_quota_renamed_dir.py21
-rw-r--r--tests/functional/quota/test_quota_single_brick_volume.py18
-rw-r--r--tests/functional/quota/test_quota_symlink_limit.py21
-rw-r--r--tests/functional/quota/test_quota_unique_soft_limit.py21
-rw-r--r--tests/functional/quota/test_quota_volume_subdir_limits.py20
10 files changed, 86 insertions, 120 deletions
diff --git a/tests/functional/quota/test_alert_time_out.py b/tests/functional/quota/test_alert_time_out.py
index 1eaa8258b..cadb0de72 100755
--- a/tests/functional/quota/test_alert_time_out.py
+++ b/tests/functional/quota/test_alert_time_out.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2018 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2015-2020 Red Hat, Inc. <http://www.redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -55,20 +55,17 @@ class QuotaTimeOut(GlusterBaseClass):
% cls.volname)
g.log.info("Successful in Setup and Mount Volume %s", cls.volname)
- @classmethod
- def tearDownClass(cls):
- """
- Clean up the volume and umount volume from client
- """
- # Stopping the volume
+ def tearDown(self):
+
+ # Unmount and cleanup original volume
g.log.info("Starting to Unmount Volume and Cleanup Volume")
- ret = cls.unmount_volume_and_cleanup_volume(mounts=cls.mounts)
+ ret = self.unmount_volume_and_cleanup_volume(mounts=self.mounts)
if not ret:
- raise ExecutionError("Failed to Unmount Volume and Cleanup Volume")
- g.log.info("Successful in Unmount Volume and Cleanup Volume")
+ raise ExecutionError("Failed to umount the vol & cleanup Volume")
+ g.log.info("Successful in umounting the volume and Cleanup")
- # Calling GlusterBaseClass tearDownClass
- cls.get_super_method(cls, 'tearDownClass')()
+ # Calling GlusterBaseClass tearDown
+ self.get_super_method(self, 'tearDown')()
def test_alert_time_out(self):
"""
diff --git a/tests/functional/quota/test_deem_statfs.py b/tests/functional/quota/test_deem_statfs.py
index 5da70d896..92cc44e74 100644
--- a/tests/functional/quota/test_deem_statfs.py
+++ b/tests/functional/quota/test_deem_statfs.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2019 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2015-2020 Red Hat, Inc. <http://www.redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -48,21 +48,17 @@ class QuotaStatvfs(GlusterBaseClass):
% cls.volname)
g.log.info("Successful in Setup and Mount Volume %s", cls.volname)
- @classmethod
- def tearDownClass(cls):
- """
- Clean up the volume and umount volume from client
- """
+ def tearDown(self):
- # stopping the volume
+ # Unmount and cleanup original volume
g.log.info("Starting to Unmount Volume and Cleanup Volume")
- ret = cls.unmount_volume_and_cleanup_volume(mounts=cls.mounts)
+ ret = self.unmount_volume_and_cleanup_volume(mounts=self.mounts)
if not ret:
- raise ExecutionError("Failed to Unmount Volume and Cleanup Volume")
- g.log.info("Successful in Unmount Volume and Cleanup Volume")
+ raise ExecutionError("Failed to umount the vol & cleanup Volume")
+ g.log.info("Successful in umounting the volume and Cleanup")
- # calling GlusterBaseClass tearDownClass
- cls.get_super_method(cls, 'tearDownClass')()
+ # Calling GlusterBaseClass tearDown
+ self.get_super_method(self, 'tearDown')()
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 7773d4d36..8aecfc6e6 100644
--- a/tests/functional/quota/test_deem_statfs_quotad.py
+++ b/tests/functional/quota/test_deem_statfs_quotad.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2018 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2015-2020 Red Hat, Inc. <http://www.redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -40,20 +40,17 @@ class QuotaDeemStatfsAndQuotad(GlusterBaseClass):
raise ExecutionError("Failed to Setup_Volume")
g.log.info("Successful in Setup Volume")
- @classmethod
- def tearDownClass(cls):
- """
- Clean up the volume
- """
- # stopping the volume and clean up the volume
- g.log.info("Starting to Cleanup Volume")
- ret = cls.cleanup_volume()
+ def tearDown(self):
+
+ # Unmount and cleanup original volume
+ g.log.info("Starting to Unmount Volume and Cleanup Volume")
+ ret = self.unmount_volume_and_cleanup_volume(mounts=self.mounts)
if not ret:
- raise ExecutionError("Failed to Cleanup Volume")
- g.log.info("Successful in Cleanup Volume")
+ raise ExecutionError("Failed to umount the vol & cleanup Volume")
+ g.log.info("Successful in umounting the volume and Cleanup")
- # calling GlusterBaseClass tearDownClass
- cls.get_super_method(cls, 'tearDownClass')()
+ # Calling GlusterBaseClass tearDown
+ self.get_super_method(self, 'tearDown')()
def test_quota_deem_statfs_quotad(self):
"""
diff --git a/tests/functional/quota/test_multi_value_limit.py b/tests/functional/quota/test_multi_value_limit.py
index 046f0f6a3..76187bb64 100644
--- a/tests/functional/quota/test_multi_value_limit.py
+++ b/tests/functional/quota/test_multi_value_limit.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2018 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2015-2020 Red Hat, Inc. <http://www.redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -50,21 +50,17 @@ class QuotaMultiValueLimits(GlusterBaseClass):
% cls.volname)
g.log.info("Successful in Setup and Mount Volume %s", cls.volname)
- @classmethod
- def tearDownClass(cls):
- """
- Clean up the volume and umount volume from client
- """
+ def tearDown(self):
- # stopping the volume
+ # Unmount and cleanup original volume
g.log.info("Starting to Unmount Volume and Cleanup Volume")
- ret = cls.unmount_volume_and_cleanup_volume(mounts=cls.mounts)
+ ret = self.unmount_volume_and_cleanup_volume(mounts=self.mounts)
if not ret:
- raise ExecutionError("Failed to Unmount Volume and Cleanup Volume")
- g.log.info("Successful in Unmount Volume and Cleanup Volume")
+ raise ExecutionError("Failed to umount the vol & cleanup Volume")
+ g.log.info("Successful in umounting the volume and Cleanup")
- # calling GlusterBaseClass tearDownClass
- cls.get_super_method(cls, 'tearDownClass')()
+ # Calling GlusterBaseClass tearDown
+ self.get_super_method(self, 'tearDown')()
def test_quota_multi_value_limits(self):
# pylint: disable=too-many-statements
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 4bee23b0a..ed777fbf5 100644
--- a/tests/functional/quota/test_quota_file_larger_than_limit.py
+++ b/tests/functional/quota/test_quota_file_larger_than_limit.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2017-2018 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2017-2020 Red Hat, Inc. <http://www.redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -50,20 +50,17 @@ class QuotaFileLargerThanLimit(GlusterBaseClass):
% cls.volname)
g.log.info("Successful in Setup and Mount Volume %s", cls.volname)
- @classmethod
- def tearDownClass(cls):
- """
- Clean up the volume and umount volume from client
- """
- # stopping the volume
+ def tearDown(self):
+
+ # Unmount and cleanup original volume
g.log.info("Starting to Unmount Volume and Cleanup Volume")
- ret = cls.unmount_volume_and_cleanup_volume(mounts=cls.mounts)
+ ret = self.unmount_volume_and_cleanup_volume(mounts=self.mounts)
if not ret:
- raise ExecutionError("Failed to Unmount Volume and Cleanup Volume")
- g.log.info("Successful in Unmount Volume and Cleanup Volume")
+ raise ExecutionError("Failed to umount the vol & cleanup Volume")
+ g.log.info("Successful in umounting the volume and Cleanup")
- # calling GlusterBaseClass tearDownClass
- cls.get_super_method(cls, 'tearDownClass')()
+ # Calling GlusterBaseClass tearDown
+ self.get_super_method(self, 'tearDown')()
def test_quota_file_larger_than_limit(self):
# pylint: disable=too-many-statements
diff --git a/tests/functional/quota/test_quota_renamed_dir.py b/tests/functional/quota/test_quota_renamed_dir.py
index d8b6acae6..e4bc11233 100755
--- a/tests/functional/quota/test_quota_renamed_dir.py
+++ b/tests/functional/quota/test_quota_renamed_dir.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2018 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2015-2020 Red Hat, Inc. <http://www.redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -47,20 +47,17 @@ class TestQuotaRenamedDir(GlusterBaseClass):
% cls.volname)
g.log.info("Successful in Setup and Mount Volume %s", cls.volname)
- @classmethod
- def tearDownClass(cls):
- """
- Clean up the volume and umount volume from client
- """
- # stopping the volume
+ def tearDown(self):
+
+ # Unmount and cleanup original volume
g.log.info("Starting to Unmount Volume and Cleanup Volume")
- ret = cls.unmount_volume_and_cleanup_volume(mounts=cls.mounts)
+ ret = self.unmount_volume_and_cleanup_volume(mounts=self.mounts)
if not ret:
- raise ExecutionError("Failed to Unmount Volume and Cleanup Volume")
- g.log.info("Successful in Unmount Volume and Cleanup Volume")
+ raise ExecutionError("Failed to umount the vol & cleanup Volume")
+ g.log.info("Successful in umounting the volume and Cleanup")
- # calling GlusterBaseClass tearDownClass
- cls.get_super_method(cls, 'tearDownClass')()
+ # Calling GlusterBaseClass tearDown
+ self.get_super_method(self, 'tearDown')()
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 33537a115..cb228baee 100644
--- a/tests/functional/quota/test_quota_single_brick_volume.py
+++ b/tests/functional/quota/test_quota_single_brick_volume.py
@@ -66,21 +66,17 @@ class QuotaListPathValues(GlusterBaseClass):
raise ExecutionError("Failed to Setup_Volume and Mount_Volume")
g.log.info("Successful in Setup and Mount Volume %s", cls.volname)
- @classmethod
- def tearDownClass(cls):
- """
- Clean up the volume and umount volume from client
- """
+ def tearDown(self):
- # stopping the volume
+ # Unmount and cleanup original volume
g.log.info("Starting to Unmount Volume and Cleanup Volume")
- ret = cls.unmount_volume_and_cleanup_volume(mounts=cls.mounts)
+ ret = self.unmount_volume_and_cleanup_volume(mounts=self.mounts)
if not ret:
- raise ExecutionError("Failed to Unmount Volume and Cleanup Volume")
- g.log.info("Successful in Unmount Volume and Cleanup Volume")
+ raise ExecutionError("Failed to umount the vol & cleanup Volume")
+ g.log.info("Successful in umounting the volume and Cleanup")
- # calling GlusterBaseClass tearDownClass
- cls.get_super_method(cls, 'tearDownClass')()
+ # Calling GlusterBaseClass tearDown
+ self.get_super_method(self, 'tearDown')()
def test_quota_single_brick_volume(self):
"""
diff --git a/tests/functional/quota/test_quota_symlink_limit.py b/tests/functional/quota/test_quota_symlink_limit.py
index 165640eee..a4c27dac9 100644
--- a/tests/functional/quota/test_quota_symlink_limit.py
+++ b/tests/functional/quota/test_quota_symlink_limit.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2017-2018 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2017-2020 Red Hat, Inc. <http://www.redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -45,20 +45,17 @@ class QuotaUniqueSoftLimit(GlusterBaseClass):
% cls.volname)
g.log.info("Successful in Setup and Mount Volume %s", cls.volname)
- @classmethod
- def tearDownClass(cls):
- """
- Clean up the volume and umount volume from client
- """
- # Stopping the volume
+ def tearDown(self):
+
+ # Unmount and cleanup original volume
g.log.info("Starting to Unmount Volume and Cleanup Volume")
- ret = cls.unmount_volume_and_cleanup_volume(mounts=cls.mounts)
+ ret = self.unmount_volume_and_cleanup_volume(mounts=self.mounts)
if not ret:
- raise ExecutionError("Failed to Unmount Volume and Cleanup Volume")
- g.log.info("Successful in Unmount Volume and Cleanup Volume")
+ raise ExecutionError("Failed to umount the vol & cleanup Volume")
+ g.log.info("Successful in umounting the volume and Cleanup")
- # Calling GlusterBaseClass tearDownClass
- cls.get_super_method(cls, 'tearDownClass')()
+ # Calling GlusterBaseClass tearDown
+ self.get_super_method(self, 'tearDown')()
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 ad7d3e4c9..14bb15148 100644
--- a/tests/functional/quota/test_quota_unique_soft_limit.py
+++ b/tests/functional/quota/test_quota_unique_soft_limit.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2017-2018 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2017-2020 Red Hat, Inc. <http://www.redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -48,20 +48,17 @@ class QuotaUniqueSoftLimit(GlusterBaseClass):
% cls.volname)
g.log.info("Successful in Setup and Mount Volume %s", cls.volname)
- @classmethod
- def tearDownClass(cls):
- """
- Clean up the volume and umount volume from client
- """
- # Stopping the volume
+ def tearDown(self):
+
+ # Unmount and cleanup original volume
g.log.info("Starting to Unmount Volume and Cleanup Volume")
- ret = cls.unmount_volume_and_cleanup_volume(mounts=cls.mounts)
+ ret = self.unmount_volume_and_cleanup_volume(mounts=self.mounts)
if not ret:
- raise ExecutionError("Failed to Unmount Volume and Cleanup Volume")
- g.log.info("Successful in Unmount Volume and Cleanup Volume")
+ raise ExecutionError("Failed to umount the vol & cleanup Volume")
+ g.log.info("Successful in umounting the volume and Cleanup")
- # Calling GlusterBaseClass tearDownClass
- cls.get_super_method(cls, 'tearDownClass')()
+ # Calling GlusterBaseClass tearDown
+ self.get_super_method(self, 'tearDown')()
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 4da2ae86d..aa5a8c13b 100644
--- a/tests/functional/quota/test_quota_volume_subdir_limits.py
+++ b/tests/functional/quota/test_quota_volume_subdir_limits.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2018 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2015-2020 Red Hat, Inc. <http://www.redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -49,21 +49,17 @@ class QuotaVolumeAndSubdirLimits(GlusterBaseClass):
% cls.volname)
g.log.info("Successful in Setup and Mount Volume %s", cls.volname)
- @classmethod
- def tearDownClass(cls):
- """
- Clean up the volume and umount volume from client
- """
+ def tearDown(self):
- # stopping the volume
+ # Unmount and cleanup original volume
g.log.info("Starting to Unmount Volume and Cleanup Volume")
- ret = cls.unmount_volume_and_cleanup_volume(mounts=cls.mounts)
+ ret = self.unmount_volume_and_cleanup_volume(mounts=self.mounts)
if not ret:
- raise ExecutionError("Failed to Unmount Volume and Cleanup Volume")
- g.log.info("Successful in Unmount Volume and Cleanup Volume")
+ raise ExecutionError("Failed to umount the vol & cleanup Volume")
+ g.log.info("Successful in umounting the volume and Cleanup")
- # calling GlusterBaseClass tearDownClass
- cls.get_super_method(cls, 'tearDownClass')()
+ # Calling GlusterBaseClass tearDown
+ self.get_super_method(self, 'tearDown')()
def test_quota_volume_subdir_limits(self):
"""