diff options
author | Steve Kemp <steve@steve.org.uk> | 2012-11-23 21:18:04 +0000 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2012-11-23 21:18:04 +0000 |
commit | 4c4829747aa5ac151c6484e9192cd81da5ed7b8b (patch) | |
tree | 3220d9f9a7bb390fa31013151147bf2c43ec8177 | |
parent | 920410718f0d225d5de05dc8d070f2ba4883b668 (diff) |
Basic testing of the DNS-protocol tester.
-rwxr-xr-x | t/test-custodian-testfactory.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/t/test-custodian-testfactory.rb b/t/test-custodian-testfactory.rb index 0f4777a..2e4f5b9 100755 --- a/t/test-custodian-testfactory.rb +++ b/t/test-custodian-testfactory.rb @@ -126,6 +126,28 @@ class TestTestFactory < Test::Unit::TestCase + + # + # Test the DNS test may be created + # + def test_dns_handler + + assert_nothing_raised do + assert( Custodian::TestFactory.create( "a.ns.bytemark.co.uk must run dns for bytemark.co.uk resolving NS as '80.68.80.26;85.17.170.78;80.68.80.27'." ) ) + end + + # + # Missing record-type + # + assert_raise ArgumentError do + Custodian::TestFactory.create( "a.ns.bytemark.co.uk must run dns for bytemark.co.uk as '80.68.80.26;85.17.170.78;80.68.80.27'." ) + end + + end + + + + # # Test the creation of inverted tests. # @@ -177,6 +199,7 @@ class TestTestFactory < Test::Unit::TestCase registered.each do |obj| + # # Try to get the name # @@ -184,6 +207,11 @@ class TestTestFactory < Test::Unit::TestCase if ( name =~ /protocoltest::(.*)Test$/i ) tst = $1.dup.downcase + # + # NOTE: Skip the DNS test - it is more complex. + # + next if ( tst =~ /dns/ ) + # normal test_one = "http://foo/ must run #{tst} on 1234" test_two = "http://foo/ must not run #{tst} on 12345" |