]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test/pybind: fix test_rbd.TestClone.test_trash_snapshot 23559/head
authorMykola Golub <mgolub@suse.com>
Thu, 26 Jul 2018 07:34:57 +0000 (10:34 +0300)
committerJason Dillaman <dillaman@redhat.com>
Thu, 16 Aug 2018 12:07:32 +0000 (08:07 -0400)
Fixes: http://tracker.ceph.com/issues/25114
Signed-off-by: Mykola Golub <mgolub@suse.com>
(cherry picked from commit 84a6385b8893872ec66ea12054daf143c2555abc)

src/test/pybind/test_rbd.py

index 18e4d6d6b824710853b39caacb458536da54d689..fd7ffbed66ec027dfad8d3532a82f4a4029e53db 100644 (file)
@@ -1379,12 +1379,14 @@ class TestClone(object):
         rados.conf_set("rbd_default_clone_format", "auto")
 
         self.image.remove_snap('snap2')
-        self.rbd.remove(ioctx, clone_name)
 
         snaps = [s for s in self.image.list_snaps() if s['name'] != 'snap1']
         eq([RBD_SNAP_NAMESPACE_TYPE_TRASH], [s['namespace'] for s in snaps])
         eq([{'original_name' : 'snap2'}], [s['trash'] for s in snaps])
 
+        self.rbd.remove(ioctx, clone_name)
+        eq([], [s for s in self.image.list_snaps() if s['name'] != 'snap1'])
+
 class TestExclusiveLock(object):
 
     @require_features([RBD_FEATURE_EXCLUSIVE_LOCK])