]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/cephfs: fix AssertionError: CommandFailedError not raised under py3
authorXiubo Li <xiubli@redhat.com>
Tue, 21 Apr 2020 02:22:55 +0000 (22:22 -0400)
committerKefu Chai <kchai@redhat.com>
Wed, 3 Jun 2020 11:57:00 +0000 (19:57 +0800)
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 7f57576123b81051a5e64f7c7234153ee11f4062)

qa/tasks/cephfs/test_volume_client.py

index 189d080ec17d8ca98dc4355913ff5f3f7df99970..1997daa31c799cc35ada2cf3e44d2d6f032bb2ca 100644 (file)
@@ -637,8 +637,10 @@ vc.disconnect()
         # Read existing content of the volume.
         self.assertListEqual(guest_mount.ls(guest_mount.mountpoint), ["data.bin"])
         # Cannot write into read-only volume.
-        with self.assertRaises(CommandFailedError):
+        try:
             guest_mount.write_n_mb("rogue.bin", 1)
+        except CommandFailedError:
+            pass
 
     def test_get_authorized_ids(self):
         """