aboutsummaryrefslogtreecommitdiff
path: root/test/tc_mauve_source_list.rb
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2012-11-23 10:49:11 +0000
committerPatrick J Cherry <patrick@bytemark.co.uk>2012-11-23 10:49:11 +0000
commit73972fbcf2ce001c0b465f57bc748ab3a976412c (patch)
treeabd373ac65d7d4bb1ca6794e339a74c87182b12e /test/tc_mauve_source_list.rb
parent7ee5acc25e47a0d1c8d27acb8ce4e80ad48087b6 (diff)
Minimal DNS now also extends to resolution of items in the source
lists too, as well as the hostname/IP being queried.
Diffstat (limited to 'test/tc_mauve_source_list.rb')
-rw-r--r--test/tc_mauve_source_list.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/tc_mauve_source_list.rb b/test/tc_mauve_source_list.rb
index 6241a2f..138286a 100644
--- a/test/tc_mauve_source_list.rb
+++ b/test/tc_mauve_source_list.rb
@@ -91,7 +91,11 @@ class TcMauveSourceList < Mauve::UnitTest
def test_ip_crossmatch_fail_when_minimal_dns_is_available
Configuration.current.minimal_dns_lookups = true
+ dns_lookup_count_before_test = MauveResolv.count
+ #
+ # These should all fail, since no extra cossmatching is happening.
+ #
sl = SourceList.new("test")
assert_nothing_raised { sl += "test-1.example.com" }
assert( !sl.includes?("www.example.com"), "www.example.com not found in #{sl.list}" )
@@ -99,6 +103,8 @@ class TcMauveSourceList < Mauve::UnitTest
sl = SourceList.new("test")
assert_nothing_raised { sl += "2001::/3" }
assert( !sl.includes?("www2.example.com"), "www2.example.com not found in #{sl.list}" )
+
+ assert_equal(0, MauveResolv.count - dns_lookup_count_before_test, "Some DNS lookups took place, even when minimal_dns_lookups was set")
end
def test_remote_source_list