diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2012-03-22 17:40:15 +0000 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2012-03-22 17:40:15 +0000 |
commit | 2622cd5d2cb322b78229d345d82076a582925ae2 (patch) | |
tree | 2e7349408ebf9fc8ea6bfd206b8499830a3c9580 /test/th_mauve_resolv.rb | |
parent | 499c144b8cfd973d3766fd81a4e702aa0013de0e (diff) |
Updated a couple of test helpers.
Diffstat (limited to 'test/th_mauve_resolv.rb')
-rw-r--r-- | test/th_mauve_resolv.rb | 8 |
1 files changed, 7 insertions, 1 deletions
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 |