--- trunk/t/5_Node.t 2006/01/05 21:51:29 35 +++ trunk/t/5_Node.t 2006/01/05 22:27:03 38 @@ -3,7 +3,7 @@ use strict; use blib; -use Test::More tests => 11; +use Test::More tests => 12; use Test::Exception; use Data::Dumper; @@ -17,7 +17,7 @@ ok($node->set_url('http://localhost:1978/'), 'set_url'); -ok($node->set_proxy('proxy.example.com', 8080), 'set_proxy'); +ok($node->set_proxy('', 8080), 'set_proxy'); throws_ok {$node->set_proxy('proxy.example.com', 'foo') } qr/port/, 'set_proxy port NaN'; ok($node->set_timeout(42), 'set_timeout'); @@ -27,9 +27,14 @@ cmp_ok($node->status, '==', -1, 'status'); +my @res = ( -1, 200 ); + my $nodelist; -cmp_ok($node->shuttle_url( '?action=nodelist', 'text/plain', undef, \$nodelist), - '==', 200, 'nodelist'); +foreach my $url (qw{?action=nodelist http://localhost:1978/master_ui?action=nodelist}) { + cmp_ok( + $node->shuttle_url( $url, 'text/plain', undef, \$nodelist) + ,'==', shift @res, 'nodelist'); +} my $draft = <<'_END_OF_DRAFT_'; @uri=data001