From: dparmar18 Date: Thu, 1 Dec 2022 10:32:39 +0000 (+0530) Subject: qa/test_nfs: added testcase test_non_existent_cluster X-Git-Tag: v18.1.0~591^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b91aff831d55739fdcf982a9c5eecc88cb578e17;p=ceph.git qa/test_nfs: added testcase test_non_existent_cluster Fixes: https://tracker.ceph.com/issues/58138 Signed-off-by: Dhairya Parmar --- diff --git a/qa/tasks/cephfs/test_nfs.py b/qa/tasks/cephfs/test_nfs.py index 1f439cd31831..4d6bf9f1858a 100644 --- a/qa/tasks/cephfs/test_nfs.py +++ b/qa/tasks/cephfs/test_nfs.py @@ -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)