From d969fb33183bddcbf8d06eec43d573279d2322c0 Mon Sep 17 00:00:00 2001 From: John Spray Date: Mon, 13 Aug 2018 11:09:19 -0400 Subject: [PATCH] test/cephfs: add pybind test for mount_root No test for filesystem_name because the environment of these tests isn't sufficient for multiple filesystems Signed-off-by: John Spray --- src/test/pybind/test_cephfs.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/test/pybind/test_cephfs.py b/src/test/pybind/test_cephfs.py index d6235abf97558..584d150eaeddd 100644 --- a/src/test/pybind/test_cephfs.py +++ b/src/test/pybind/test_cephfs.py @@ -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") + -- 2.39.5