From: zhangjiao Date: Tue, 15 Oct 2019 07:49:33 +0000 (+0800) Subject: test/pybind/rbd.pyx: add test_remove_snap_by_id case in test_rbd.py X-Git-Tag: v15.1.0~1242^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b938e9a94069c36c0810f985a865751c6c7dd669;p=ceph.git test/pybind/rbd.pyx: add test_remove_snap_by_id case in test_rbd.py Signed-off-by: Zhang Jiao --- diff --git a/src/test/pybind/test_rbd.py b/src/test/pybind/test_rbd.py index 1f2a5b8ddd86..b86b0d12424f 100644 --- a/src/test/pybind/test_rbd.py +++ b/src/test/pybind/test_rbd.py @@ -747,6 +747,15 @@ class TestImage(object): self.image.remove_snap('snap1') eq([], list(self.image.list_snaps())) + def test_remove_snap_by_id(self): + eq([], list(self.image.list_snaps())) + self.image.create_snap('snap1') + eq(['snap1'], [snap['name'] for snap in self.image.list_snaps()]) + for snap in self.image.list_snaps(): + snap_id = snap["id"] + self.image.remove_snap_by_id(snap_id) + eq([], list(self.image.list_snaps())) + def test_rename_snap(self): eq([], list(self.image.list_snaps())) self.image.create_snap('snap1')