r22552: this doesn't need a dc
[gd/samba-autobuild/.git] / source4 / script / tests / test_ldap.sh
1 #!/bin/sh
2 # test some simple LDAP and CLDAP operations
3
4 incdir=`dirname $0`
5 . $incdir/test_functions.sh
6
7 p=ldap
8 for options in "" "--option=socket:testnonblock=true" "-U\$USERNAME%\$PASSWORD --option=socket:testnonblock=true" "-U\$USERNAME%\$PASSWORD"; do
9     plantest "TESTING PROTOCOL $p with options $options" dc ../testprogs/blackbox/test_ldb.sh $p \$SERVER $options
10 done
11 # see if we support ldaps
12 if grep ENABLE_GNUTLS.1 include/config.h > /dev/null; then
13     p=ldaps
14     for options in "" "-U\$USERNAME%\$PASSWORD"; do
15         plantest "TESTING PROTOCOL $p with options $options" dc ../testprogs/blackbox/test_ldb.sh $p \$SERVER $options
16     done
17 fi
18 for t in LDAP-CLDAP LDAP-BASIC LDAP-SCHEMA LDAP-UPTODATENESS
19 do
20         plantest "$t" dc bin/smbtorture $TORTURE_OPTIONS "-U\$USERNAME%\$PASSWORD" //\$SERVER/_none_ $t
21 done
22
23 # only do the ldb tests when not in quick mode - they are quite slow, and ldb
24 # is now pretty well tested by the rest of the quick tests anyway
25 test "$TORTURE_QUICK" = "yes" || {
26    LDBDIR=lib/ldb
27    export LDBDIR
28    plantest "ldb" none $LDBDIR/tests/test-tdb.sh
29 }
30
31 SCRIPTDIR=../testprogs/ejs
32
33 plantest "ejs ldap" dc $SCRIPTDIR/ldap.js $CONFIGURATION \$SERVER -U\$USERNAME%\$PASSWORD