diff options
Diffstat (limited to 'src/test/librbd/mock/exclusive_lock')
-rw-r--r-- | src/test/librbd/mock/exclusive_lock/MockPolicy.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/test/librbd/mock/exclusive_lock/MockPolicy.h b/src/test/librbd/mock/exclusive_lock/MockPolicy.h new file mode 100644 index 00000000..f49eeb23 --- /dev/null +++ b/src/test/librbd/mock/exclusive_lock/MockPolicy.h @@ -0,0 +1,23 @@ +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab + +#ifndef CEPH_TEST_LIBRBD_MOCK_EXCLUSIVE_LOCK_POLICY_H +#define CEPH_TEST_LIBRBD_MOCK_EXCLUSIVE_LOCK_POLICY_H + +#include "librbd/exclusive_lock/Policy.h" +#include <gmock/gmock.h> + +namespace librbd { +namespace exclusive_lock { + +struct MockPolicy : public Policy { + + MOCK_METHOD0(may_auto_request_lock, bool()); + MOCK_METHOD1(lock_requested, int(bool)); + MOCK_METHOD1(accept_blocked_request, bool(OperationRequestType)); +}; + +} // namespace exclusive_lock +} // librbd + +#endif |