]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test: MockJournaler: add get_cached_client method
authorMykola Golub <mgolub@mirantis.com>
Wed, 6 Apr 2016 11:57:29 +0000 (14:57 +0300)
committerAbhishek Varshney <abhishek.varshney@flipkart.com>
Mon, 2 May 2016 06:35:58 +0000 (12:05 +0530)
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
(cherry picked from commit 7633407ab584ce8c7777a525554773c2a358ce5f)

src/test/rbd_mirror/mock/MockJournaler.h

index 5f08c12d82eecaa8f126a4fa24efc08a7b6a0c63..03bb6be41adf8fa1db3caa13e03f6ab4cd257c26 100644 (file)
@@ -76,6 +76,9 @@ struct MockJournaler {
   MOCK_METHOD2(update_client, void(const bufferlist&, Context *on_safe));
 
   MOCK_METHOD3(get_tag, void(uint64_t, cls::journal::Tag *, Context *));
+
+  MOCK_METHOD2(get_cached_client, int(const std::string &,
+                                     cls::journal::Client *));
 };
 
 struct MockJournalerProxy {
@@ -126,6 +129,11 @@ struct MockJournalerProxy {
   void get_tag(uint64_t tag_tid, cls::journal::Tag *tag, Context *on_finish) {
     MockJournaler::get_instance().get_tag(tag_tid, tag, on_finish);
   }
+
+  int get_cached_client(const std::string &client_id,
+                        cls::journal::Client *client) {
+    return MockJournaler::get_instance().get_cached_client(client_id, client);
+  }
 };
 
 std::ostream &operator<<(std::ostream &os, const MockJournalerProxy &);