]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/cephfs: add pybind test for mount_root
authorJohn Spray <john.spray@redhat.com>
Mon, 13 Aug 2018 15:09:19 +0000 (11:09 -0400)
committerJohn Spray <john.spray@redhat.com>
Mon, 17 Sep 2018 18:00:14 +0000 (14:00 -0400)
No test for filesystem_name because the
environment of these tests isn't sufficient
for multiple filesystems

Signed-off-by: John Spray <john.spray@redhat.com>
src/test/pybind/test_cephfs.py

index d6235abf975589f5a68c712b7fe241148bf75d7c..584d150eaeddd2745bc038f0e8ae2f965fdb4e8e 100644 (file)
@@ -224,3 +224,13 @@ def test_mount_unmount():
     cephfs.unmount()
     cephfs.mount()
     test_open()
+
+@with_setup(setup_test)
+def test_mount_root():
+    cephfs.mkdir(b"/mount-directory", 0o755)
+    cephfs.unmount()
+    cephfs.mount(mount_root = b"/mount-directory")
+    cephfs.unmount()
+
+    assert_raises(libcephfs.Error, cephfs.mount, mount_root = b"/nowhere")
+