]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: test fs lsflags command
authorJos Collin <jcollin@redhat.com>
Thu, 4 Mar 2021 12:28:51 +0000 (17:58 +0530)
committerJos Collin <jcollin@redhat.com>
Thu, 8 Apr 2021 05:39:18 +0000 (11:09 +0530)
Fixes: https://tracker.ceph.com/issues/48682
Signed-off-by: Jos Collin <jcollin@redhat.com>
qa/tasks/cephfs/test_misc.py

index cf3b1a1bf8cd83c95da143fabc8f07cbd3cca15d..40bb8fb1d9d754c69bfc6fd001b066fa70d7e0cc 100644 (file)
@@ -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