--- trunk/t/5_Node.t 2006/03/12 19:43:21 117 +++ trunk/t/5_Node.t 2006/05/09 12:42:39 135 @@ -3,13 +3,13 @@ use strict; use blib; -use Test::More tests => 115; +use Test::More tests => 120; use Test::Exception; use Data::Dumper; BEGIN { use_ok('Search::Estraier') }; -my $debug = 0; +my $debug = 1; # name of node for test my $test1_node = 'test1'; @@ -30,9 +30,21 @@ cmp_ok($node->status, '==', -1, 'status'); +# test master functionality + +diag "not testing shutdown\n"; + +ok(my $foo = $node->master( action => 'sync' ), 'sync'); + +diag "not testing backup\n"; + +ok(my @users = $node->master( action => 'userlist' ), 'userlist'); + +diag "users: ", Dumper( \@users ); + SKIP: { -skip "no $test1_node node in Hyper Estraier", 105, unless($node->name); +skip "no $test1_node node in Hyper Estraier", 110, unless($node->name); my @res = ( -1, 200 ); @@ -156,6 +168,13 @@ ok(! $node->admins, 'no admins'); ok(! $node->guests, 'no guests'); +# test search without results + +ok($cond = new Search::Estraier::Condition, 'new cond'); +ok($cond->set_phrase('this_is_phrase_which_does_not_exits'), 'cond set_phrase'); + +ok($nres = $node->search( $cond, 0 ), 'search'); + SKIP: { skip "no $test2_node in Hyper Estraier, skipping set_link", 5 unless (my $test2_label = $node2->label);