summaryrefslogtreecommitdiff
path: root/t/test-custodian-util-dns.rb
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2015-03-09 13:19:47 +0000
committerSteve Kemp <steve@steve.org.uk>2015-03-09 13:19:47 +0000
commite716a49dabe2c086a97e2d8b3cffe5cf369ad026 (patch)
treee7e98125f89941db4c9d0f48f2df9c410467a3d8 /t/test-custodian-util-dns.rb
parentaf2ee063abea8235a8cbd1448533e4f4fbc0d0af (diff)
Removed spaces inside parenthesis.
Diffstat (limited to 't/test-custodian-util-dns.rb')
-rwxr-xr-xt/test-custodian-util-dns.rb36
1 files changed, 18 insertions, 18 deletions
diff --git a/t/test-custodian-util-dns.rb b/t/test-custodian-util-dns.rb
index 2582d94..399639b 100755
--- a/t/test-custodian-util-dns.rb
+++ b/t/test-custodian-util-dns.rb
@@ -30,27 +30,27 @@ class TestDNSUtil < Test::Unit::TestCase
#
def test_lookup
- details = Custodian::Util::DNS.hostname_to_ip( 'bytemark.co.uk' )
- assert( ( details == '2001:41c9:0:1019:81::80' ) ||
- ( details == '80.68.81.80' ) )
+ details = Custodian::Util::DNS.hostname_to_ip('bytemark.co.uk')
+ assert((details == '2001:41c9:0:1019:81::80') ||
+ (details == '80.68.81.80'))
- details = Custodian::Util::DNS.hostname_to_ip( 'www.bytemark.co.uk' )
- assert( ( details == '2001:41c9:0:1019:81::80' ) ||
- ( details == '80.68.81.80' ) )
+ details = Custodian::Util::DNS.hostname_to_ip('www.bytemark.co.uk')
+ 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('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' )
+ details = Custodian::Util::DNS.hostname_to_ip('ipv6.steve.org.uk')
+ assert(details == '2001:41c8:10b:103::10')
#
# Failure case
#
- details = Custodian::Util::DNS.hostname_to_ip( 'this.doesnot.exist' )
- assert( details.nil? )
+ details = Custodian::Util::DNS.hostname_to_ip('this.doesnot.exist')
+ assert(details.nil?)
end
@@ -63,20 +63,20 @@ class TestDNSUtil < Test::Unit::TestCase
#
# IPv6 lookup
#
- details = Custodian::Util::DNS.ip_to_hostname( '2001:41c9:0:1019:81::80' )
- assert( details =~ /bytemark(-?hosting)?\.(com|eu|co\.uk)$/i )
+ details = Custodian::Util::DNS.ip_to_hostname('2001:41c9:0:1019:81::80')
+ assert(details =~ /bytemark(-?hosting)?\.(com|eu|co\.uk)$/i)
#
# IPv4 lookup
#
- details = Custodian::Util::DNS.ip_to_hostname( '80.68.81.80' )
- assert( details =~ /bytemark(-?hosting)?\.(com|eu|co\.uk)$/i )
+ details = Custodian::Util::DNS.ip_to_hostname('80.68.81.80')
+ assert(details =~ /bytemark(-?hosting)?\.(com|eu|co\.uk)$/i)
#
# Bogus lookup - should return nil.
#
- details = Custodian::Util::DNS.ip_to_hostname( '800.683.853.348' )
- assert( details.nil? )
+ details = Custodian::Util::DNS.ip_to_hostname('800.683.853.348')
+ assert(details.nil?)
end
end