]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: added test case test_nfs_export_with_invalid_path
authordparmar18 <dparmar@redhat.com>
Thu, 15 Dec 2022 12:00:07 +0000 (17:30 +0530)
committerDhairya Parmar <dparmar@redhat.com>
Thu, 30 Mar 2023 13:59:15 +0000 (19:29 +0530)
Fixes: https://tracker.ceph.com/issues/58228
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
qa/tasks/cephfs/test_nfs.py

index dc380610aa7c8a512d25802f9b529a863d401f2b..78b622d755b6115c7dde4044f84db7ad34777161 100644 (file)
@@ -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()