From: Rishabh Dave Date: Sat, 30 Apr 2022 09:35:23 +0000 (+0530) Subject: qa/cephfs: fix minor bug in caps_helper.py's run_mon_cap_tests() X-Git-Tag: v18.0.0~771^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f01188d72acfec9cbe261469f0c71a41b28c09e6;p=ceph.git qa/cephfs: fix minor bug in caps_helper.py's run_mon_cap_tests() 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 --- diff --git a/qa/tasks/cephfs/caps_helper.py b/qa/tasks/cephfs/caps_helper.py index f3bc14b07420..3e49d9f79e24 100644 --- a/qa/tasks/cephfs/caps_helper.py +++ b/qa/tasks/cephfs/caps_helper.py @@ -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 \