summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2015-03-09 13:01:13 +0000
committerSteve Kemp <steve@steve.org.uk>2015-03-09 13:01:13 +0000
commit34908abb790b8e1cd3abe618c6c9f54b23d673b5 (patch)
treef98e57a8d7b618494100aef835cc22606548fd98 /t
parent43959bccde198171cee796fdfbd82ae5a75a4378 (diff)
Added more tests.
Diffstat (limited to 't')
-rwxr-xr-xt/test-custodian-util-dns.rb20
1 files changed, 12 insertions, 8 deletions
diff --git a/t/test-custodian-util-dns.rb b/t/test-custodian-util-dns.rb
index e5a83a6..f226efe 100755
--- a/t/test-custodian-util-dns.rb
+++ b/t/test-custodian-util-dns.rb
@@ -30,17 +30,21 @@ class TestDNSUtil < Test::Unit::TestCase
#
def test_lookup
- #
- # IPv6 lookup
- #
details = Custodian::Util::DNS.hostname_to_ip( "bytemark.co.uk" )
- assert( details == "80.68.81.80" )
+ assert( ( details == "2001:41c9:0:1019:81::80" ) ||
+ ( details == "80.68.81.80" ) )
- #
- # IPv4 lookup
- #
details = Custodian::Util::DNS.hostname_to_ip( "www.bytemark.co.uk" )
- assert( details == "80.68.81.80" )
+ assert( ( details == "2001:41c9:0:1019:81::80" ) ||
+ ( details == "80.68.81.80" ) )
+
+
+ details = Custodian::Util::DNS.hostname_to_ip( "ipv4.steve.org.uk" )
+ assert( details == "80.68.84.103" )
+
+ details = Custodian::Util::DNS.hostname_to_ip( "ipv6.steve.org.uk" )
+ assert( details == "2001:41c8:10b:103::10" )
+
#
# Failure case