diff options
author | Adam Wolfe Gordon <awg@digitalocean.com> | 2017-11-28 21:37:57 +0100 |
---|---|---|
committer | Adam Wolfe Gordon <awg@digitalocean.com> | 2017-11-28 22:17:38 +0100 |
commit | 027f4d0196e06c6d89bc3a5eb7e4e345bd1d0c0b (patch) | |
tree | 1adf752b3a493f1da778fe70c9a5af763077c2ba /src/test/pybind | |
parent | librbd: Use util functions to generate header names in list_watchers (diff) | |
download | ceph-027f4d0196e06c6d89bc3a5eb7e4e345bd1d0c0b.tar.xz ceph-027f4d0196e06c6d89bc3a5eb7e4e345bd1d0c0b.zip |
pybind: Add support for rbd_watchers_list
Also add a test.
Signed-off-by: Adam Wolfe Gordon <awg@digitalocean.com>
Diffstat (limited to 'src/test/pybind')
-rw-r--r-- | src/test/pybind/test_rbd.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/pybind/test_rbd.py b/src/test/pybind/test_rbd.py index f46f09cedcf..b5a7ce3ec8d 100644 --- a/src/test/pybind/test_rbd.py +++ b/src/test/pybind/test_rbd.py @@ -854,6 +854,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): |