Improve IP Address tests

This commit is contained in:
Jérôme Leclercq 2023-12-29 16:08:24 +01:00 committed by GitHub
parent 8a32c748bb
commit 3fa3ccc0e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -134,7 +134,7 @@ SCENARIO("IpAddress", "[NETWORK][IPADDRESS]")
{
WHEN("We get the IP of Nazara")
{
std::vector<Nz::HostnameInfo> hostnameInfos = Nz::IpAddress::ResolveHostname(Nz::NetProtocol::Any, "nazara.digitalpulsesoftware.net");
std::vector<Nz::HostnameInfo> hostnameInfos = Nz::IpAddress::ResolveHostname(Nz::NetProtocol::Any, "nazara.digitalpulse.software");
THEN("Result is not null")
{
@ -142,13 +142,14 @@ SCENARIO("IpAddress", "[NETWORK][IPADDRESS]")
}
}
WHEN("We convert IP to hostname")
WHEN("We resolve IP to hostname")
{
Nz::IpAddress google(8, 8, 8, 8);
THEN("Google (DNS) is 8.8.8.8")
{
std::string dnsAddress = Nz::IpAddress::ResolveAddress(google);
bool dnsCheck = dnsAddress == "google-public-dns-a.google.com" || dnsAddress == "dns.google";
INFO(dnsAddress);
CHECK(dnsCheck);
}
}