2 # =============================================================================
3 # $Id: 02_directory_update.t,v 1.3 2003-03-05 13:55:22 pop Exp $
6 # =============================================================================
11 push (@INC,'demo','blib/lib','blib/arch');
17 use Test::More tests => 9;
19 # ----------------------------------------------------------------------------
20 # Session opening and closing
23 IDZebra::logFile("test.log");
24 use_ok('IDZebra::Session');
29 # ----------------------------------------------------------------------------
30 # Session opening and closing
31 my $sess = IDZebra::Session->open(configFile => 'demo/zebra.cfg',
32 groupName => 'demo2');
33 isa_ok($sess,"IDZebra::Session");
36 skip "Takes a while", 5 if (0);
38 # ----------------------------------------------------------------------------
41 # ----------------------------------------------------------------------------
46 $sess->update(path => 'lib');
47 my $stat = $sess->end_trans;
49 ok(($stat->{inserted} == $filecount),
50 "Inserted $stat->{inserted}/$filecount records");
53 $sess->update(groupName => 'demo1',
56 $stat = $sess->end_trans;
57 ok(($stat->{inserted} == $filecount),
58 "Inserted $stat->{inserted}/$filecount records");
61 $sess->delete(groupName => 'demo1',
63 $stat = $sess->end_trans;
64 ok(($stat->{deleted} == $filecount),
65 "Deleted $stat->{deleted}/$filecount records");
68 $sess->update(groupName => 'demo1',
71 $stat = $sess->end_trans;
72 ok(($stat->{inserted} == $filecount),
73 "Inserted $stat->{inserted}/$filecount records with shadow");
75 ok(($sess->group->{databaseName} eq "demo2"),"Original group is selected");
77 # ----------------------------------------------------------------------------