From: Gangbiao Liu Date: Wed, 23 Oct 2019 02:26:02 +0000 (+0800) Subject: test/pybind: add create_snap rasie ImageExists test case X-Git-Tag: v15.1.0~1108^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=22974178ad24767812a30aff1157f829a9a43f7d;p=ceph-ci.git test/pybind: add create_snap rasie ImageExists test case Signed-off-by: Gangbiao Liu --- diff --git a/src/test/pybind/test_rbd.py b/src/test/pybind/test_rbd.py index 77c0e2df353..2795d901334 100644 --- a/src/test/pybind/test_rbd.py +++ b/src/test/pybind/test_rbd.py @@ -741,6 +741,11 @@ class TestImage(object): eq(snap_data, b'\0' * 256) self.image.remove_snap('snap1') + def test_create_snap_exists(self): + self.image.create_snap('snap1') + assert_raises(ImageExists, self.image.create_snap, 'snap1') + self.image.remove_snap('snap1') + def test_list_snaps(self): eq([], list(self.image.list_snaps())) self.image.create_snap('snap1')