From f01188d72acfec9cbe261469f0c71a41b28c09e6 Mon Sep 17 00:00:00 2001 From: Rishabh Dave Date: Sat, 30 Apr 2022 15:05:23 +0530 Subject: [PATCH] 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 --- qa/tasks/cephfs/caps_helper.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 \ -- 2.47.3