From: Xiubo Li Date: Tue, 21 Apr 2020 02:22:55 +0000 (-0400) Subject: qa/cephfs: fix AssertionError: CommandFailedError not raised under py3 X-Git-Tag: v14.2.10~17^2~31 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0f27b7ba5a6cd35f5cda54d8482c99c72acc9b4b;p=ceph.git qa/cephfs: fix AssertionError: CommandFailedError not raised under py3 Signed-off-by: Xiubo Li (cherry picked from commit 7f57576123b81051a5e64f7c7234153ee11f4062) --- diff --git a/qa/tasks/cephfs/test_volume_client.py b/qa/tasks/cephfs/test_volume_client.py index 189d080ec17..1997daa31c7 100644 --- a/qa/tasks/cephfs/test_volume_client.py +++ b/qa/tasks/cephfs/test_volume_client.py @@ -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): """