2 # $Id: test1.sh,v 1.4 2003-05-06 17:39:01 adam Exp $
3 echo "testing without stored keys (zebra1.cfg)"
5 echo "See if servers are running...."
11 rm -f records/esdd000[12].grs # these should not be here, will be created later
13 ../../index/zebraidx -l idx.log -c zebra1.cfg init || exit 1
16 ../../index/zebraidx -l idx.log -c zebra1.cfg update records || exit 1
18 echo "killing old server (if any)..."
19 test -f zebrasrv.pid && kill `cat zebrasrv.pid`
23 echo "starting server..."
24 ../../index/zebrasrv -S -c zebra1.cfg -l srv.log tcp:@:9901 &
27 echo "checking it runs..."
28 test -f zebrasrv.pid || exit 1
31 ../testclient localhost:9901 utah > log || exit 1
32 grep "^Result count: 17$" log || exit 1
35 ../testclient localhost:9901 "@or utah the" > log || exit 1
36 grep "^Result count: 40$" log || exit 1
39 ../testclient localhost:9901 "@attr 1=4 the" > log || exit 1
40 grep "^Result count: 1$" log || exit 1
43 ../testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
44 grep "^Result count: 9$" log || exit 1
47 ../../index/zebraidx -l idx.log -c zebra1.cfg update records || exit 1
50 ../testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
51 grep "^Result count: 18$" log || exit 1
53 echo "stopping server..."
54 test -f zebrasrv.pid || exit 1
55 kill `cat zebrasrv.pid` || exit 1