r2554: added a test for a bug that jelmer pointed out (handling of -s one)
[jelmer/samba4-debian.git] / source / lib / ldb / tests / test-generic.sh
1 echo "Adding base elements"
2 $VALGRIND bin/ldbadd tests/test.ldif || exit 1
3
4 echo "Modifying elements"
5 $VALGRIND bin/ldbmodify tests/test-modify.ldif || exit 1
6
7 echo "Showing modified record"
8 $VALGRIND bin/ldbsearch '(uid=uham)'  || exit 1
9
10 echo "Starting ldbtest"
11 time $VALGRIND bin/ldbtest -r 1000 -s 10  || exit 1
12
13 echo "Adding index"
14 $VALGRIND bin/ldbadd tests/test-index.ldif  || exit 1
15
16 echo "Starting ldbtest indexed"
17 time $VALGRIND bin/ldbtest -r 1000 -s 5000  || exit 1
18
19 echo "Testing one level search"
20 count=`$VALGRIND bin/ldbsearch -b 'ou=Groups,o=University of Michigan,c=US' -s one 'objectclass=*' none |grep ^dn | wc -l`
21 if [ "$count" != 3 ]; then
22     echo returned $count records - expected 3
23     exit 1
24 fi