summaryrefslogtreecommitdiffstats
path: root/src/test/pybind
diff options
context:
space:
mode:
authorJason Dillaman <dillaman@redhat.com>2017-04-28 16:05:57 +0200
committerJason Dillaman <dillaman@redhat.com>2017-05-01 16:10:13 +0200
commit4b48b9fe68623f1d9283eec0fd7a38ee60c18ce5 (patch)
treec63017d76d926620b8950814b723826043823756 /src/test/pybind
parentlibrbd: get_parent_info should return cached parent name (diff)
downloadceph-4b48b9fe68623f1d9283eec0fd7a38ee60c18ce5.tar.xz
ceph-4b48b9fe68623f1d9283eec0fd7a38ee60c18ce5.zip
librbd: extended parent info API to retrieve parent id
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Diffstat (limited to 'src/test/pybind')
-rw-r--r--src/test/pybind/test_rbd.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/pybind/test_rbd.py b/src/test/pybind/test_rbd.py
index c3eb371d5e6..57c35fd82c8 100644
--- a/src/test/pybind/test_rbd.py
+++ b/src/test/pybind/test_rbd.py
@@ -938,6 +938,7 @@ class TestClone(object):
eq(pool, pool_name)
eq(image, image_name)
eq(snap, 'snap1')
+ eq(self.image.id(), self.clone.parent_id())
# create a new pool...
pool_name2 = get_temp_pool_name()
@@ -954,6 +955,7 @@ class TestClone(object):
eq(pool, pool_name)
eq(image, image_name)
eq(snap, 'snap1')
+ eq(self.image.id(), self.other_clone.parent_id())
# can't unprotect snap with children
assert_raises(ImageBusy, self.image.unprotect_snap, 'snap1')
@@ -1127,6 +1129,8 @@ class TestClone(object):
clone.flatten()
assert_raises(ImageNotFound, clone.parent_info)
assert_raises(ImageNotFound, clone2.parent_info)
+ assert_raises(ImageNotFound, clone.parent_id)
+ assert_raises(ImageNotFound, clone2.parent_id)
after_flatten = clone.read(IMG_SIZE // 2, 256)
eq(data, after_flatten)
after_flatten = clone2.read(IMG_SIZE // 2, 256)
@@ -1220,6 +1224,7 @@ class TestExclusiveLock(object):
image1.write(data, 0)
image2.flatten()
assert_raises(ImageNotFound, image1.parent_info)
+ assert_raises(ImageNotFound, image1.parent_id)
parent = True
for x in range(30):
try: