]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/cephfs: fix minor bug in caps_helper.py's run_mon_cap_tests() 46168/head
authorRishabh Dave <ridave@redhat.com>
Sat, 30 Apr 2022 09:35:23 +0000 (15:05 +0530)
committerRishabh Dave <ridave@redhat.com>
Fri, 27 May 2022 09:49:38 +0000 (15:19 +0530)
When an entity's MON cap contains no FS name in it, the entity has the
access to all the FSs on cluster and not just to the default FS of the
cluster.

Fixes: https://tracker.ceph.com/issues/55558
Signed-off-by: Rishabh Dave <ridave@redhat.com>
qa/tasks/cephfs/caps_helper.py

index f3bc14b074205e0dbbb7be2fb63e40d57fd32627..3e49d9f79e249632f9963efc976f4f20d02cb4bf 100644 (file)
@@ -13,10 +13,9 @@ class CapsHelper(CephFSTestCase):
         fsls = self.run_cluster_cmd(f'fs ls --id {self.client_id} -k '
                                     f'{keyring_path}')
 
-        # we need to check only for default FS when fsname clause is absent
-        # in MON/MDS caps
-        if 'fsname' not in moncap:
-            self.assertIn(self.fs.name, fsls)
+        if 'fsname=' not in moncap:
+            fsls_admin = self.run_cluster_cmd('fs ls')
+            self.assertEqual(fsls, fsls_admin)
             return
 
         fss = (self.fs1.name, self.fs2.name) if hasattr(self, 'fs1') else \