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 | 5b899cd520229c26d1eefd612e683129489f67e3 (patch) | |
tree | 03b5d92015ada2f69538c0e624d6dace5a6960a4 /lib | |
parent | 0beca5c4b92359221a2f170e1daec89d815b5e8c (diff) |
make dns comparisons alL LoWeR CaSe
Diffstat (limited to 'lib')
-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 |