ctdb-daemon: Use ctdb_parse_node_address() in ctdbd
[samba4-gss.git] / lib / ldb / tests / test-ldap.sh
blob6e0e4a4299bcf1b2ad8eeb07f9472406c517c1e7
1 #!/bin/sh
3 PATH=/usr/local/sbin:/usr/sbin:/sbin:$PATH
4 export PATH
5 SCHEMA_NEEDED="core nis cosine inetorgperson openldap"
7 # setup needed schema files
8 for f in $SCHEMA_NEEDED; do
9 if [ ! -r tests/schema/$f.schema ]; then
10 mkdir -p tests/schema
11 if [ -r /etc/ldap/schema/$f.schema ]; then
12 ln -s /etc/ldap/schema/$f.schema tests/schema/$f.schema
13 continue
15 if [ -r /etc/openldap/schema/$f.schema ]; then
16 ln -s /etc/openldap/schema/$f.schema tests/schema/$f.schema
17 continue
20 echo "SKIPPING TESTS: you need the following OpenLDAP schema files"
21 for f in $SCHEMA_NEEDED; do
22 echo " $f.schema"
23 done
24 exit 0
26 done
28 if [ -z "$LDBDIR" ]; then
29 LDBDIR=$(dirname $0)/..
30 export LDBDIR
33 LDB_URL=$($LDBDIR/tests/ldapi_url.sh)
34 export LDB_URL
36 PATH=bin:$PATH
37 export PATH
39 LDB_SPECIALS=0
40 export LDB_SPECIALS
42 if $LDBDIR/tests/init_slapd.sh &&
43 $LDBDIR/tests/start_slapd.sh &&
44 $LDBDIR/tests/test-generic.sh; then
45 echo "ldap tests passed"
46 ret=0
47 else
48 echo "ldap tests failed"
49 ret=$?
52 #$LDBDIR/tests/kill_slapd.sh
54 exit $ret