]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
test/pybind/test_rados.py: add another rollback test
authorMatan Breizman <mbreizma@redhat.com>
Sun, 2 Oct 2022 12:31:51 +0000 (12:31 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Tue, 3 Jan 2023 13:47:04 +0000 (13:47 +0000)
Added another rollback test case:
Do not remove the original object to be rollbacked to.

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
src/test/pybind/test_rados.py

index e68269ff01edc2ba7fe65e2c43d6e0efa1f6001b..6334d6ebd78a65c2d7990dda032e6bb556a5b305 100644 (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")