From f4288f2a9be842d7f5c68ebc1f04e3ab821397a8 Mon Sep 17 00:00:00 2001 From: Xiubo Li Date: Fri, 23 Apr 2021 11:06:21 +0800 Subject: [PATCH] qa: move the is_full() to parent class Signed-off-by: Xiubo Li --- qa/tasks/cephfs/test_full.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/qa/tasks/cephfs/test_full.py b/qa/tasks/cephfs/test_full.py index 54152548677..654d14c8044 100644 --- a/qa/tasks/cephfs/test_full.py +++ b/qa/tasks/cephfs/test_full.py @@ -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'] -- 2.39.5