test/mon: Accept ENOENT as returned value on FreeBSD

FreeBSD returns ENOENT on resolv error

Tracker: https://tracker.ceph.com/issues/48183
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
This commit is contained in:
Willem Jan Withagen 2020-11-11 15:09:12 +01:00
parent 364e385a04
commit 5ae4827970

View File

@ -237,5 +237,9 @@ TEST(MonMapBuildInitial, build_initial_mon_host_from_dns_fail) {
cct->_conf.set_val("mon_host", "ceph.noname");
MonMap monmap;
int r = monmap.build_initial(cct.get(), false, std::cerr);
#if defined(__FreeBSD__)
ASSERT_EQ(r, -ENOENT);
#else
ASSERT_EQ(r, -EINVAL);
#endif
}