MCPcopy Create free account
hub / github.com/ceph/ceph / TEST

Function TEST

src/test/mon/MonMap.cc:224–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

222}
223
224TEST(MonMapBuildInitial, build_initial_mon_host_from_dns) {
225 boost::intrusive_ptr<CephContext> cct(new CephContext(CEPH_ENTITY_TYPE_MON), false);
226 cct->_conf.set_val("mon_host", "ceph.io");
227 MonMap monmap;
228 int r = monmap.build_initial(cct.get(), false, std::cerr);
229 ASSERT_EQ(r, 0);
230 ASSERT_GE(monmap.mon_info.size(), 1u);
231 for (const auto& [name, info] : monmap.mon_info) {
232 std::cerr << info << std::endl;
233 }
234}
235
236TEST(MonMapBuildInitial, build_initial_mon_host_from_dns_fail) {
237 boost::intrusive_ptr<CephContext> cct(new CephContext(CEPH_ENTITY_TYPE_MON), false);

Callers

nothing calls this directly

Calls 4

build_initialMethod · 0.80
set_valMethod · 0.45
getMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected