From 17a46d5576721746f78a0a2d31d1b81019f5565a Mon Sep 17 00:00:00 2001 From: Matan Breizman Date: Sun, 2 Oct 2022 12:31:51 +0000 Subject: [PATCH] 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 --- src/test/pybind/test_rados.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/test/pybind/test_rados.py b/src/test/pybind/test_rados.py index e68269ff01e..6334d6ebd78 100644 --- a/src/test/pybind/test_rados.py +++ b/src/test/pybind/test_rados.py @@ -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")