diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2014-12-11 11:04:41 +0000 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2014-12-11 11:04:41 +0000 |
commit | 3c5c0dad89a897e12af3a01b64a507f4c2ffe18c (patch) | |
tree | 6422e7858702b8ca229bbafaadf2f5c7272b2922 /lib/custodian/protocoltest | |
parent | ddf52402dd5511617718e3bf0f68f9e23fa645ba (diff) |
make dns comparisons alL LoWeR CaSe
Diffstat (limited to 'lib/custodian/protocoltest')
-rw-r--r-- | lib/custodian/protocoltest/dns.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/custodian/protocoltest/dns.rb b/lib/custodian/protocoltest/dns.rb index daa0c4d..d8f65c0 100644 --- a/lib/custodian/protocoltest/dns.rb +++ b/lib/custodian/protocoltest/dns.rb @@ -55,7 +55,7 @@ module Custodian if ( line =~ /for\s+([^\s]+)\sresolving\s([A-Z]+)\s+as\s'([^']+)'/ ) @resolve_name = $1.dup @resolve_type = $2.dup - @resolve_expected = $3.dup + @resolve_expected = $3.dup.downcase end # @@ -136,16 +136,16 @@ module Custodian case ltype when /^A$/ then - dns.getresources(name, Resolv::DNS::Resource::IN::A).map{ |r| results.push(r.address.to_s()) } + dns.getresources(name, Resolv::DNS::Resource::IN::A).map{ |r| results.push( r.address.to_s().downcase ) } when /^AAAA$/ then - dns.getresources(name, Resolv::DNS::Resource::IN::AAAA).map{ |r| results.push( r.address.to_s()) } + dns.getresources(name, Resolv::DNS::Resource::IN::AAAA).map{ |r| results.push( r.address.to_s().downcase ) } when /^NS$/ then - dns.getresources(name, Resolv::DNS::Resource::IN::NS).map{ |r| results.push( Resolv.getaddresses(r.name.to_s())) } + dns.getresources(name, Resolv::DNS::Resource::IN::NS).map{ |r| results.push( Resolv.getaddresses( r.name.to_s().downcase ) ) } when /^MX$/ then - dns.getresources(name, Resolv::DNS::Resource::IN::MX).map{ |r| results.push( Resolv.getaddresses(r.exchange.to_s())) } + dns.getresources(name, Resolv::DNS::Resource::IN::MX).map{ |r| results.push( Resolv.getaddresses( r.exchange.to_s().downcase ) ) } else @error = "Unknown record type to resolve: '#{ltype}'" return nil |