diff options
author | Steve Kemp <steve@steve.org.uk> | 2016-04-22 21:42:32 +0300 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2016-04-22 21:42:32 +0300 |
commit | 12de7cf1aefcd5d567a9e6e2eaa061f2074c8dbb (patch) | |
tree | 5912d325d739d66a05690cb0d4b87a92ffde3fca /lib/custodian/protocoltest/dns.rb | |
parent | 91bfb015647bba1249a96933a48d88f2a50039a9 (diff) |
More updates to silence rubocop style-guides.
These warnings were largely whitespace-based.
Diffstat (limited to 'lib/custodian/protocoltest/dns.rb')
-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 b7e75c0..10844db 100644 --- a/lib/custodian/protocoltest/dns.rb +++ b/lib/custodian/protocoltest/dns.rb @@ -45,7 +45,7 @@ module Custodian # @line = line - if line =~ /for\s+([^\s]+)\sresolving\s([A-Z]+)\s+as\s'([^']+)'/ + if line =~ /for\s+([^\s]+)\sresolving\s([A-Z]+)\s+as\s'([^']+)'/ @resolve_name = $1.dup @resolve_type = $2.dup @resolve_expected = $3.dup.downcase.split(/[\s,]+/) @@ -93,20 +93,20 @@ module Custodian # Get the timeout period. # settings = Custodian::Settings.instance - period = settings.timeout + period = settings.timeout # # Do the lookup # - results = resolve_via(@host, resolve_type, resolve_name, period) - return Custodian::TestResult::TEST_FAILED if results.nil? + results = resolve_via(@host, resolve_type, resolve_name, period) + return Custodian::TestResult::TEST_FAILED if results.nil? # # OK we have an array of results. If every one of the expected # results is contained in those results returned then we're good. # - if !(results - @resolve_expected).empty? or !(@resolve_expected - results).empty? + if !(results - @resolve_expected).empty? or !(@resolve_expected - results).empty? @error = "DNS server *#{@host}* (#{@server_ip}) returned the wrong records for @#{resolve_name} IN #{resolve_type}@.\n\nWe expected '#{resolve_expected.join(',')}', but we received '#{results.join(',')}'\n" return Custodian::TestResult::TEST_FAILED end |