From: Jos Collin Date: Thu, 4 Mar 2021 12:28:51 +0000 (+0530) Subject: qa: test fs lsflags command X-Git-Tag: v17.1.0~2242^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=58b62f10d9228944f709794f78f4ac2340e44670;p=ceph.git qa: test fs lsflags command Fixes: https://tracker.ceph.com/issues/48682 Signed-off-by: Jos Collin --- diff --git a/qa/tasks/cephfs/test_misc.py b/qa/tasks/cephfs/test_misc.py index cf3b1a1bf8cd..40bb8fb1d9d7 100644 --- a/qa/tasks/cephfs/test_misc.py +++ b/qa/tasks/cephfs/test_misc.py @@ -199,6 +199,22 @@ class TestMisc(CephFSTestCase): info = self.fs.mds_asok(['dump', 'inode', hex(ino)]) assert info['path'] == "/foo" + def test_fs_lsflags(self): + """ + Check that the lsflags displays the default state and the new state of flags + """ + # Set some flags + self.fs.set_joinable(False) + self.fs.set_allow_new_snaps(False) + self.fs.set_allow_standby_replay(True) + + lsflags = json.loads(self.fs.mon_manager.raw_cluster_cmd('fs', 'lsflags', + self.fs.name, + "--format=json-pretty")) + self.assertEqual(lsflags["joinable"], False) + self.assertEqual(lsflags["allow_snaps"], False) + self.assertEqual(lsflags["allow_multimds_snaps"], True) + self.assertEqual(lsflags["allow_standby_replay"], True) class TestCacheDrop(CephFSTestCase): CLIENTS_REQUIRED = 1