diff options
-rw-r--r-- | test/th_mauve.rb | 2 | ||||
-rw-r--r-- | test/th_mauve_resolv.rb | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/test/th_mauve.rb b/test/th_mauve.rb index 7972b9d..2b97e64 100644 --- a/test/th_mauve.rb +++ b/test/th_mauve.rb @@ -69,7 +69,7 @@ module Mauve @logger = Log4r::Logger.new 'Mauve' @outputter = Mauve::TestOutputter.new("test") @outputter.formatter = Log4r::PatternFormatter.new( :pattern => "%d %l %m" ) - @outputter.level = Log4r::WARN + @outputter.level = ($debug ? Log4r::DEBUG : Log4r::WARN) @logger.outputters << @outputter return @logger end diff --git a/test/th_mauve_resolv.rb b/test/th_mauve_resolv.rb index 98b597b..10bdacc 100644 --- a/test/th_mauve_resolv.rb +++ b/test/th_mauve_resolv.rb @@ -14,13 +14,19 @@ module Mauve alias_method :get_ips_for_without_testing, :get_ips_for def get_ips_for_with_testing(host) + lookup = { "test-1.example.com" => %w(1.2.3.4 2001:1:2:3::4), "test-2.example.com" => %w(1.2.3.5 2001:1:2:3::5), "www.example.com" => %w(1.2.3.4), "www2.example.com" => %w(1.2.3.5 2001:2::2) } - lookup[host] || get_ips_for_without_testing(host) + if lookup.has_key?(host) + self.count += lookup[host].length if $debug + lookup[host] + else + get_ips_for_without_testing(host) + end end alias_method :get_ips_for, :get_ips_for_with_testing |