]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test: revert to default mount state in test_cephfs:test_mount_root()
authorVenky Shankar <vshankar@redhat.com>
Fri, 28 Feb 2020 07:36:36 +0000 (02:36 -0500)
committerRamana Raja <rraja@redhat.com>
Mon, 16 Mar 2020 09:48:58 +0000 (15:18 +0530)
without this tests written after test_mount_root() in the source
were failing with

     cephfs.LibCephFSStateError: You cannot perform that operation on a
     CephFS object in state initialized.

... since the test fiddles with the default mount which is root.

Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit db8b8a6791060eeb4aa10d00ffbb56e71a22142e)

src/test/pybind/test_cephfs.py

index 164e288a50c138c908b3a04a6583a5a0550a363b..992d066ee094553a4f41029d0084b6ef5c3b4542 100644 (file)
@@ -232,9 +232,10 @@ 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")
+    cephfs.unmount()
+    cephfs.mount()
 
 @with_setup(setup_test)
 def test_utime():