test/pybind/test_rados.py: add another rollback test

Added another rollback test case:
Do not remove the original object to be rollbacked to.

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
This commit is contained in:
Matan Breizman 2022-10-02 12:31:51 +00:00
parent 66e9cc4eb5
commit 17a46d5576

View File

@ -409,6 +409,16 @@ class TestIoctx(object):
self.ioctx.remove_snap("snap1")
self.ioctx.remove_object("insnap")
@attr('rollback')
def test_snap_rollback_removed(self):
self.ioctx.write("insnap", b"contents1")
self.ioctx.create_snap("snap1")
self.ioctx.write("insnap", b"contents2")
self.ioctx.snap_rollback("insnap", "snap1")
eq(self.ioctx.read("insnap"), b"contents1")
self.ioctx.remove_snap("snap1")
self.ioctx.remove_object("insnap")
def test_snap_read(self):
self.ioctx.write("insnap", b"contents1")
self.ioctx.create_snap("snap1")