From 9bcae26bd674ae921d2c0a9d4e4f6a7c727ba61a Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Mon, 10 Dec 2012 13:17:01 +0000 Subject: Ensure we raise an exception if we're trying to resolve an unknown record-type. Added test-case too. --- lib/custodian/protocoltest/dns.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/custodian/protocoltest/dns.rb b/lib/custodian/protocoltest/dns.rb index 65dfa2b..eb76f77 100644 --- a/lib/custodian/protocoltest/dns.rb +++ b/lib/custodian/protocoltest/dns.rb @@ -60,6 +60,7 @@ module Custodian raise ArgumentError, "Missing host to resolve" unless( @resolve_name ) raise ArgumentError, "Missing type of record to lookup" unless( @resolve_type ) raise ArgumentError, "Missing expected results" unless( @resolve_expected ) + raise ArgumentError, "Uknown record type: #{@resolve_type}" unless( @resolve_type =~ /^(A|NS|MX|AAAA)$/ ) # # The host to query against -- cgit v1.2.1