]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/cephfs: minor adjustment in test_admin.TestFsAuthorize
authorRishabh Dave <ridave@redhat.com>
Tue, 13 Feb 2024 16:33:19 +0000 (22:03 +0530)
committerRishabh Dave <ridave@redhat.com>
Mon, 9 Sep 2024 13:50:11 +0000 (19:20 +0530)
Move related methods ("_remount_and_run_tests()" and "_remount()")
closer to each other and move "tearDown()" to the bottom.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
(cherry picked from commit f33cc3303454a5688a2a568caa4067ba4a8dc847)

qa/tasks/cephfs/test_admin.py

index eca7dbf0d0f6c4af7614019ae742e6be0faa194d..a22fbb746e0eedf2347e68b63c4aab0b0c0dbd04 100644 (file)
@@ -1873,12 +1873,6 @@ class TestFsAuthorize(CephFSTestCase):
             self.captesters[i].run_cap_tests(self.fs, self.client_id, PERM,
                                              PATH)
 
-    def tearDown(self):
-        self.mount_a.umount_wait()
-        self.run_ceph_cmd(f'auth rm {self.client_name}')
-
-        super(type(self), self).tearDown()
-
     def _remount(self, keyring, path='/'):
         keyring_path = self.mount_a.client_remote.mktemp(data=keyring)
         self.mount_a.remount(client_id=self.client_id,
@@ -1897,6 +1891,12 @@ class TestFsAuthorize(CephFSTestCase):
 
         captester.run_cap_tests(self.fs, self.client_id, PERM, PATH)
 
+    def tearDown(self):
+        self.mount_a.umount_wait()
+        self.run_ceph_cmd(f'auth rm {self.client_name}')
+
+        super(type(self), self).tearDown()
+
 
 class TestFsAuthorizeUpdate(CephFSTestCase):
     client_id = 'testuser'