]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test/crimson: add dummy_auth_handler to test_monc
authorYingxin Cheng <yingxincheng@gmail.com>
Wed, 10 Apr 2019 09:42:31 +0000 (17:42 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 11 Apr 2019 13:13:03 +0000 (21:13 +0800)
Signed-off-by: Yingxin Cheng <yingxincheng@gmail.com>
src/test/crimson/test_monc.cc

index 671aa644ff71768a71e6ce27deea4e4ef850a061..742c34d59405a5c847584c204acb07d9e772b166 100644 (file)
@@ -1,5 +1,6 @@
 #include <seastar/core/app-template.hh>
 #include "common/ceph_argparse.h"
+#include "crimson/common/auth_handler.h"
 #include "crimson/common/config_proxy.h"
 #include "crimson/mon/MonClient.h"
 #include "crimson/net/Connection.h"
@@ -8,6 +9,19 @@
 using Config = ceph::common::ConfigProxy;
 using MonClient = ceph::mon::Client;
 
+namespace {
+
+class DummyAuthHandler : public ceph::common::AuthHandler {
+public:
+  void handle_authentication(const EntityName& name,
+                             uint64_t global_id,
+                             const AuthCapsInfo& caps) override {}
+};
+
+DummyAuthHandler dummy_handler;
+
+}
+
 static seastar::future<> test_monc()
 {
   return ceph::common::sharded_conf().start(EntityName{}, string_view{"ceph"}).then([] {
@@ -35,7 +49,7 @@ static seastar::future<> test_monc()
       if (conf->ms_crc_header) {
         msgr->set_crc_header();
       }
-      return seastar::do_with(MonClient{*msgr},
+      return seastar::do_with(MonClient{*msgr, dummy_handler},
                               [msgr](auto& monc) {
         return msgr->start(&monc).then([&monc] {
           return seastar::with_timeout(