]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: move the is_full() to parent class
authorXiubo Li <xiubli@redhat.com>
Fri, 23 Apr 2021 03:06:21 +0000 (11:06 +0800)
committerXiubo Li <xiubli@redhat.com>
Mon, 30 Aug 2021 14:32:44 +0000 (22:32 +0800)
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit f4288f2a9be842d7f5c68ebc1f04e3ab821397a8)

qa/tasks/cephfs/test_full.py

index 54152548677d5d6a8b5c529203f4088cb58613cc..654d14c804481ae3b89b1053974882c8253fbc44 100644 (file)
@@ -25,9 +25,8 @@ class FullnessTestCase(CephFSTestCase):
     pool_capacity = None  # type: Optional[int]
     fill_mb = None
 
-    # Subclasses define what fullness means to them
     def is_full(self):
-        raise NotImplementedError()
+        return self.fs.is_full()
 
     def setUp(self):
         CephFSTestCase.setUp(self)
@@ -373,9 +372,6 @@ class TestQuotaFull(FullnessTestCase):
         self.fs.mon_manager.raw_cluster_cmd("osd", "pool", "set-quota", pool_name,
                                             "max_bytes", "{0}".format(self.pool_capacity))
 
-    def is_full(self):
-        return self.fs.is_full()
-
 
 class TestClusterFull(FullnessTestCase):
     """
@@ -393,8 +389,5 @@ class TestClusterFull(FullnessTestCase):
             TestClusterFull.pool_capacity = int(max_avail * full_ratio)
             TestClusterFull.fill_mb = (self.pool_capacity // (1024 * 1024))
 
-    def is_full(self):
-        return self.fs.is_full()
-
 # Hide the parent class so that unittest.loader doesn't try to run it.
 del globals()['FullnessTestCase']