]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/test_nfs: added testcase test_non_existent_cluster 49172/head
authordparmar18 <dparmar@redhat.com>
Thu, 1 Dec 2022 10:32:39 +0000 (16:02 +0530)
committerdparmar18 <dparmar@redhat.com>
Thu, 22 Dec 2022 14:14:17 +0000 (19:44 +0530)
Fixes: https://tracker.ceph.com/issues/58138
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
qa/tasks/cephfs/test_nfs.py

index 1f439cd3183144206b47b07b1588365c023533e4..4d6bf9f1858a3391abdf0e0f7a347a1e42e38117 100644 (file)
@@ -730,3 +730,12 @@ class TestNFS(MgrTestCase):
         exec_cmd_invalid('export', 'info')
         exec_cmd_invalid('export', 'info', 'clusterid')
         exec_cmd_invalid('export', 'apply')
+
+    def test_non_existent_cluster(self):
+        """
+        Test that cluster info doesn't throw junk data for non-existent cluster
+        """
+        cluseter_ls = self._nfs_cmd('cluster', 'ls')
+        self.assertNotIn('foo', cluseter_ls, 'cluster foo exists')
+        cluster_info = self._nfs_cmd('cluster', 'info', 'foo')
+        self.assertIn('cluster does not exist', cluster_info)