svn commit: samba r7671 - in
branches/SAMBA_4_0/source/script/tests: .
tridge at samba.org
tridge at samba.org
Fri Jun 17 03:30:50 GMT 2005
Author: tridge
Date: 2005-06-17 03:30:49 +0000 (Fri, 17 Jun 2005)
New Revision: 7671
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7671
Log:
added ldap testing to the set of standard tests
Modified:
branches/SAMBA_4_0/source/script/tests/selftest.sh
branches/SAMBA_4_0/source/script/tests/test_ldap.sh
Changeset:
Modified: branches/SAMBA_4_0/source/script/tests/selftest.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/selftest.sh 2005-06-17 03:21:27 UTC (rev 7670)
+++ branches/SAMBA_4_0/source/script/tests/selftest.sh 2005-06-17 03:30:49 UTC (rev 7671)
@@ -85,6 +85,7 @@
sleep 4
failed=0
+ $SRCDIR/script/tests/test_ldap.sh localhost || failed=`expr $failed + $?`
$SRCDIR/script/tests/test_rpc.sh localhost $USERNAME $PASSWORD $DOMAIN $ADDARG || failed=`expr $failed + $?`
$SRCDIR/script/tests/test_binding_string.sh localhost $USERNAME $PASSWORD $DOMAIN $ADDARG || failed=`expr $failed + $?`
$SRCDIR/script/tests/test_echo.sh localhost $USERNAME $PASSWORD $DOMAIN $ADDARG || failed=`expr $failed + $?`
Modified: branches/SAMBA_4_0/source/script/tests/test_ldap.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/test_ldap.sh 2005-06-17 03:21:27 UTC (rev 7670)
+++ branches/SAMBA_4_0/source/script/tests/test_ldap.sh 2005-06-17 03:30:49 UTC (rev 7671)
@@ -1,23 +1,28 @@
#!/bin/sh
+# test some simple LDAP and CLDAP operations
+if [ $# -lt 1 ]; then
+cat <<EOF
+Usage: test_ldap.sh SERVER
+EOF
+exit 1;
+fi
+
SERVER="$1"
-# test some simple LDAP operations
+incdir=`dirname $0`
+. $incdir/test_functions.sh
-echo "Testing RootDSE"
-ldbsearch -b '' -H ldap://$SERVER -s base DUMMY=x dnsHostName highestCommittedUSN || exit 1
+testit "RootDSE" bin/ldbsearch -b "''" -H ldap://$SERVER -s base DUMMY=x dnsHostName highestCommittedUSN || failed=`expr $failed + 1`
echo "Getting defaultNamingContext"
-BASEDN=`ldbsearch -b '' -H ldap://$SERVER -s base DUMMY=x defaultNamingContext | grep ^defaultNamingContext | awk '{print $2}'`
+BASEDN=`bin/ldbsearch -b '' -H ldap://$SERVER -s base DUMMY=x defaultNamingContext | grep ^defaultNamingContext | awk '{print $2}'`
echo "BASEDN is $BASEDN"
-echo "Listing Users"
-ldbsearch -H ldap://$SERVER -b "$BASEDN" '(objectclass=user)' sAMAccountName || exit 1
+testit "Listing Users" bin/ldbsearch -H ldap://$SERVER -b "$BASEDN" '(objectclass=user)' sAMAccountName || failed=`expr $failed + 1`
-echo "Listing Groups"
-ldbsearch -H ldap://$SERVER -b "$BASEDN" '(objectclass=group)' sAMAccountName || exit 1
+testit "Listing Users" bin/ldbsearch -H ldap://$SERVER -b "$BASEDN" '(objectclass=group)' sAMAccountName || failed=`expr $failed + 1`
-echo "CLDAP test"
-bin/smbtorture $TORTURE_OPTIONS //$SERVER/_none_ LDAP-CLDAP || exit 1
+testit "CLDAP" bin/smbtorture $TORTURE_OPTIONS //$SERVER/_none_ LDAP-CLDAP || failed=`expr $failed + 1`
More information about the samba-cvs
mailing list