1 # test01.sh - test start and stop of the server with -1
7 ../../index/zebraidx -l idx.log -c zebra1.cfg init || exit 1
9 #create a base to test on
10 ../../index/zebraidx -l idx.log -c zebra1.cfg update records || exit 1
12 #kill old server (if any)
13 test -f zebrasrv.pid && kill -9 `cat zebrasrv.pid`
17 echo "Starting server with -1 (one shot)..."
18 ../../index/zebrasrv -1 -c zebra1.cfg -l srv.log tcp:@:9901 &
21 echo " checking that it runs... "
22 test -f zebrasrv.pid || exit 1
23 PID=`cat zebrasrv.pid`
24 ps -p $PID >/dev/null || exit 1
26 echo " connecting to it..."
27 ../testclient localhost:9901 utah > log || exit 1
30 echo " checking that server does not run any more"
31 ps -p $PID >/dev/null && exit 1
35 rm -rf reg idx.log srv.log zebrasrv.pid