]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test:add test_remove_snap2 interface to remove snap when it's protected 31208/head
authorweiyingze-git <weiyingze@cmss.chinamobile.com>
Tue, 29 Oct 2019 14:24:47 +0000 (22:24 +0800)
committerweiyingze-git <weiyingze@cmss.chinamobile.com>
Wed, 30 Oct 2019 12:46:42 +0000 (20:46 +0800)
Signed-off-by: Yingze Wei <weiyingze@cmss.chinamobile.com>
src/test/pybind/test_rbd.py

index 77c0e2df353d710b67b0af386fe92bbaa438b6e7..a9acaff1ddd7d44859d4ee5daea9b1514ecc8e52 100644 (file)
@@ -762,6 +762,13 @@ class TestImage(object):
         self.image.remove_snap('snap1')
         eq([], list(self.image.list_snaps()))
 
+    def test_remove_snap2(self):
+        self.image.create_snap('snap1')
+        self.image.protect_snap('snap1')
+        assert(self.image.is_protected_snap('snap1'))
+        self.image.remove_snap2('snap1',1)
+        eq([], list(self.image.list_snaps()))
+
     def test_remove_snap_by_id(self):
        eq([], list(self.image.list_snaps()))
        self.image.create_snap('snap1')