summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2012-12-10 13:17:01 +0000
committerSteve Kemp <steve@steve.org.uk>2012-12-10 13:17:01 +0000
commit97b2d9a17e83d0d69eddcc80c2d141dbccba24ce (patch)
tree2c8e8d2c0f654b5ccbed5a4a82c26c53e32f39a3 /lib
parent46097bf25ca174c974742f4e9e0196bb819c5da1 (diff)
Ensure we raise an exception if we're trying to resolve an unknown record-type.
Added test-case too.
Diffstat (limited to 'lib')
-rw-r--r--lib/custodian/protocoltest/dns.rb1
1 files changed, 1 insertions, 0 deletions
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