diff options
Diffstat (limited to 't/test-custodian-testfactory.rb')
-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" |