diff options
author | Steve Kemp <steve@steve.org.uk> | 2015-03-09 13:01:13 +0000 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2015-03-09 13:01:13 +0000 |
commit | 34908abb790b8e1cd3abe618c6c9f54b23d673b5 (patch) | |
tree | f98e57a8d7b618494100aef835cc22606548fd98 /t/test-custodian-util-dns.rb | |
parent | 43959bccde198171cee796fdfbd82ae5a75a4378 (diff) |
Added more tests.
Diffstat (limited to 't/test-custodian-util-dns.rb')
-rwxr-xr-x | t/test-custodian-util-dns.rb | 20 |
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 |