From: Yingxin Cheng Date: Wed, 10 Apr 2019 09:42:31 +0000 (+0800) Subject: test/crimson: add dummy_auth_handler to test_monc X-Git-Tag: v15.1.0~2957^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=eab48a394e0e4931cd436d86d3a3e40767ec4714;p=ceph.git test/crimson: add dummy_auth_handler to test_monc Signed-off-by: Yingxin Cheng --- diff --git a/src/test/crimson/test_monc.cc b/src/test/crimson/test_monc.cc index 671aa644ff7..742c34d5940 100644 --- a/src/test/crimson/test_monc.cc +++ b/src/test/crimson/test_monc.cc @@ -1,5 +1,6 @@ #include #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(