mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Merge pull request #8649
2c24322
DNSResolver: fix not handling hostnames without dot characters [release] (Jeffrey Ryan)
This commit is contained in:
commit
153819fc4c
3 changed files with 11 additions and 24 deletions
|
@ -158,6 +158,17 @@ TEST(DNSResolver, GetTXTRecord)
|
|||
EXPECT_STREQ("donate.getmonero.org", addr.c_str());
|
||||
}
|
||||
|
||||
TEST(DNSResolver, Localhost)
|
||||
{
|
||||
tools::DNSResolver resolver = tools::DNSResolver::create();
|
||||
|
||||
bool avail, valid;
|
||||
std::vector<std::string> ips = resolver.get_ipv4("localhost", avail, valid);
|
||||
|
||||
ASSERT_EQ(1, ips.size());
|
||||
ASSERT_EQ("127.0.0.1", ips[0]);
|
||||
}
|
||||
|
||||
bool is_equal(const char *s, const std::vector<std::string> &v) { return v.size() == 1 && v[0] == s; }
|
||||
|
||||
TEST(DNS_PUBLIC, empty) { EXPECT_TRUE(tools::dns_utils::parse_dns_public("").empty()); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue