| 222 | } |
| 223 | |
| 224 | TEST(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 | |
| 236 | TEST(MonMapBuildInitial, build_initial_mon_host_from_dns_fail) { |
| 237 | boost::intrusive_ptr<CephContext> cct(new CephContext(CEPH_ENTITY_TYPE_MON), false); |
nothing calls this directly
no test coverage detected