diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
commit | 19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch) | |
tree | 42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/test/librbd/mock/MockImageWatcher.h | |
parent | Initial commit. (diff) | |
download | ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.tar.xz ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.zip |
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/librbd/mock/MockImageWatcher.h')
-rw-r--r-- | src/test/librbd/mock/MockImageWatcher.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/test/librbd/mock/MockImageWatcher.h b/src/test/librbd/mock/MockImageWatcher.h new file mode 100644 index 000000000..c44238ae1 --- /dev/null +++ b/src/test/librbd/mock/MockImageWatcher.h @@ -0,0 +1,34 @@ +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab + +#ifndef CEPH_TEST_LIBRBD_MOCK_IMAGE_WATCHER_H +#define CEPH_TEST_LIBRBD_MOCK_IMAGE_WATCHER_H + +#include "gmock/gmock.h" + +class Context; + +namespace librbd { + +class ProgressContext; + +struct MockImageWatcher { + MOCK_METHOD0(is_registered, bool()); + MOCK_METHOD0(is_unregistered, bool()); + MOCK_METHOD0(is_blocklisted, bool()); + MOCK_METHOD0(unregister_watch, void()); + MOCK_METHOD1(flush, void(Context *)); + + MOCK_CONST_METHOD0(get_watch_handle, uint64_t()); + + MOCK_METHOD0(notify_acquired_lock, void()); + MOCK_METHOD0(notify_released_lock, void()); + MOCK_METHOD0(notify_request_lock, void()); + + MOCK_METHOD3(notify_quiesce, void(uint64_t *, ProgressContext &, Context *)); + MOCK_METHOD2(notify_unquiesce, void(uint64_t, Context *)); +}; + +} // namespace librbd + +#endif // CEPH_TEST_LIBRBD_MOCK_IMAGE_WATCHER_H |