]> git-server-git.apps.pok.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>
Sun, 14 Jun 2020 08:34:52 +0000 (16:34 +0800)
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 7f57576123b81051a5e64f7c7234153ee11f4062)

qa/tasks/cephfs/test_volume_client.py

index a6b4d10afb8b76889cfba8e915f4e92a9449930d..fb67032a3cd25390b90ea532b849512508b1ddf6 100644 (file)
@@ -606,8 +606,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):
         """