From b0bb25024d8fad2c06138571b830afcea4994be0 Mon Sep 17 00:00:00 2001 From: dparmar18 Date: Thu, 15 Dec 2022 17:30:07 +0530 Subject: [PATCH] qa: added test case test_nfs_export_with_invalid_path Fixes: https://tracker.ceph.com/issues/58228 Signed-off-by: Dhairya Parmar --- qa/tasks/cephfs/test_nfs.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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() -- 2.39.5