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: v15.2.4~42^2~66 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bda249078eef5f23f5fb389c66d50ae23f355332;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 a6b4d10afb8b..fb67032a3cd2 100644 --- a/qa/tasks/cephfs/test_volume_client.py +++ b/qa/tasks/cephfs/test_volume_client.py @@ -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): """