]> git.apps.os.sepia.ceph.com Git - ceph-ci.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)
committerVenky Shankar <vshankar@redhat.com>
Fri, 28 Feb 2020 16:42:17 +0000 (11:42 -0500)
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>
src/test/pybind/test_cephfs.py

index 122c01258dcc49a4e399e0ba8e6ee156e80ebf44..e633ee0cd01767f566f0b7bdc02ae1a377ee5b08 100644 (file)
@@ -257,9 +257,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():