From: dparmar18 Date: Thu, 15 Dec 2022 12:00:07 +0000 (+0530) Subject: qa: added test case test_nfs_export_with_invalid_path X-Git-Tag: v19.0.0~1474^2~5 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=b0bb25024d8fad2c06138571b830afcea4994be0;p=ceph.git qa: added test case test_nfs_export_with_invalid_path Fixes: https://tracker.ceph.com/issues/58228 Signed-off-by: Dhairya Parmar --- diff --git a/qa/tasks/cephfs/test_nfs.py b/qa/tasks/cephfs/test_nfs.py index dc380610aa7c8..78b622d755b61 100644 --- a/qa/tasks/cephfs/test_nfs.py +++ b/qa/tasks/cephfs/test_nfs.py @@ -744,3 +744,17 @@ class TestNFS(MgrTestCase): except CommandFailedError as e: if e.exitstatus != errno.ENOENT: raise + + def test_nfs_export_with_invalid_path(self): + """ + Test that nfs exports can't be created with invalid path + """ + self._test_create_cluster() + try: + self._create_export(export_id='123', + extra_cmd=['--pseudo-path', self.pseudo_path, + '--path', '/non_existent_dir']) + except CommandFailedError as e: + if e.exitstatus != errno.ENOENT: + raise + self._test_delete_cluster()