From 5f5770a51d089ab7ec2abd4f12eaa0d794bb6413 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Wed, 15 Jan 2025 19:52:22 +0100 Subject: [PATCH] tests: fix IPv4Success, DNSSECSuccess "example.com" now has more than one A record --- tests/unit_tests/dns_resolver.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/tests/unit_tests/dns_resolver.cpp b/tests/unit_tests/dns_resolver.cpp index 3c890687b..34f0257af 100644 --- a/tests/unit_tests/dns_resolver.cpp +++ b/tests/unit_tests/dns_resolver.cpp @@ -41,15 +41,11 @@ TEST(DNSResolver, IPv4Success) auto ips = resolver.get_ipv4("example.com", avail, valid); - ASSERT_EQ(1, ips.size()); - - //ASSERT_STREQ("93.184.216.119", ips[0].c_str()); + ASSERT_LE(1, ips.size()); ips = tools::DNSResolver::instance().get_ipv4("example.com", avail, valid); - ASSERT_EQ(1, ips.size()); - - //ASSERT_STREQ("93.184.216.119", ips[0].c_str()); + ASSERT_LE(1, ips.size()); } TEST(DNSResolver, IPv4Failure) @@ -76,9 +72,7 @@ TEST(DNSResolver, DNSSECSuccess) auto ips = resolver.get_ipv4("example.com", avail, valid); - ASSERT_EQ(1, ips.size()); - - //ASSERT_STREQ("93.184.216.119", ips[0].c_str()); + ASSERT_LE(1, ips.size()); ASSERT_TRUE(avail); ASSERT_TRUE(valid);