From 3c5c0dad89a897e12af3a01b64a507f4c2ffe18c Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Thu, 11 Dec 2014 11:04:41 +0000 Subject: make dns comparisons alL LoWeR CaSe --- lib/custodian/protocoltest/dns.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib') 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 -- cgit v1.2.1