aboutsummaryrefslogtreecommitdiff
path: root/tests/unit_tests/dns_resolver.cpp
diff options
context:
space:
mode:
authorThomas Winget <tewinget@gmail.com>2014-09-17 17:38:54 -0400
committerRiccardo Spagni <ric@spagni.net>2014-09-23 22:58:28 +0200
commitc14c7e16839b6cfe32527f2b01a9a1507e3d419e (patch)
tree519980c3d1e09f7e29ae6002d30d0126f1b4a8c4 /tests/unit_tests/dns_resolver.cpp
parentSimplewallet should now resolve urls to addresses (diff)
downloadmonero-c14c7e16839b6cfe32527f2b01a9a1507e3d419e.tar.xz
change to allow (at least a bit) for multiple TXT records
Diffstat (limited to 'tests/unit_tests/dns_resolver.cpp')
-rw-r--r--tests/unit_tests/dns_resolver.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/unit_tests/dns_resolver.cpp b/tests/unit_tests/dns_resolver.cpp
index 3b52a5f40..27e981ef1 100644
--- a/tests/unit_tests/dns_resolver.cpp
+++ b/tests/unit_tests/dns_resolver.cpp
@@ -27,6 +27,7 @@
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <iostream>
+#include <vector>
#include "gtest/gtest.h"
@@ -97,8 +98,12 @@ TEST(DNSResolver, IPv6Failure)
TEST(DNSResolver, GetTXTRecord)
{
- std::string txt = tools::DNSResolver::instance().get_txt_record("donate.monero.cc");
- std::cout << "TXT record for donate.monero.cc: " << txt << std::endl;
+ std::vector<std::string> records = tools::DNSResolver::instance().get_txt_record("donate.monero.cc");
- EXPECT_STRNE("", txt.c_str());
+ EXPECT_NE(0, records.size());
+
+ for (auto& rec : records)
+ {
+ std::cout << "TXT record for donate.monero.cc: " << rec << std::endl;
+ }
}