summaryrefslogtreecommitdiffstats
path: root/src/test/pybind
diff options
context:
space:
mode:
authorJason Dillaman <dillaman@redhat.com>2017-12-06 21:20:13 +0100
committerGitHub <noreply@github.com>2017-12-06 21:20:13 +0100
commit1d0238fb631b5905d44e034908ff467ddcd6b1ed (patch)
treebece729fbf05c3edfc3128ce54beb5d61b60f8dc /src/test/pybind
parentMerge pull request #19337 from trociny/wip-22306 (diff)
parentpybind: Add support for rbd_watchers_list (diff)
downloadceph-1d0238fb631b5905d44e034908ff467ddcd6b1ed.tar.xz
ceph-1d0238fb631b5905d44e034908ff467ddcd6b1ed.zip
Merge pull request #19188 from adamwg/awg/rbd-watchers-api
librbd: Add a function to list image watchers Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Diffstat (limited to 'src/test/pybind')
-rw-r--r--src/test/pybind/test_rbd.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/pybind/test_rbd.py b/src/test/pybind/test_rbd.py
index 1b202a38a26..bd4005e0547 100644
--- a/src/test/pybind/test_rbd.py
+++ b/src/test/pybind/test_rbd.py
@@ -856,6 +856,12 @@ class TestImage(object):
metadata = list(self.image.metadata_list())
eq(len(metadata), N - i - 1)
+ def test_watchers_list(self):
+ watchers = list(self.image.watchers_list())
+ # The image is open (in r/w mode) from setup, so expect there to be one
+ # watcher.
+ eq(len(watchers), 1)
+
def check_diff(image, offset, length, from_snapshot, expected):
extents = []
def cb(offset, length, exists):