]> git-server-git.apps.pok.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>
Fri, 16 Feb 2024 10:53:13 +0000 (16:23 +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>
qa/tasks/cephfs/test_admin.py

index 7203d0b1f9490094b46cf8d8cd9701db0479b9e0..f109e24020514e5fed7a6ccf07c4cdc0525a0cf2 100644 (file)
@@ -1500,12 +1500,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,
@@ -1524,6 +1518,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'