diff options
author | Thomas Winget <tewinget@gmail.com> | 2014-09-17 17:38:54 -0400 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2014-09-23 22:58:28 +0200 |
commit | c14c7e16839b6cfe32527f2b01a9a1507e3d419e (patch) | |
tree | 519980c3d1e09f7e29ae6002d30d0126f1b4a8c4 /tests/unit_tests/dns_resolver.cpp | |
parent | Simplewallet should now resolve urls to addresses (diff) | |
download | monero-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.cpp | 11 |
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; + } } |