summaryrefslogtreecommitdiff
path: root/source4/script/tests/test_ldap.sh
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-04-10 20:19:31 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:49:55 -0500
commite338b4b47b6271ca46060a1fe8c61ab8afaecc8f (patch)
tree315e3b28abd60f04f5d5a7cc871e6d246ef931f2 /source4/script/tests/test_ldap.sh
parent4cc500433d07decf8fc2551b117e15537f6c8558 (diff)
downloadsamba-e338b4b47b6271ca46060a1fe8c61ab8afaecc8f.tar.gz
samba-e338b4b47b6271ca46060a1fe8c61ab8afaecc8f.tar.bz2
samba-e338b4b47b6271ca46060a1fe8c61ab8afaecc8f.zip
r22156: - Lazy evaluate variable names.
- Don't set up environments until necessary - Add --resetup-environment option - Add 'none' environment (This used to be commit ed0410309bfdefb0d31cb247c26b947956fb1137)
Diffstat (limited to 'source4/script/tests/test_ldap.sh')
-rwxr-xr-xsource4/script/tests/test_ldap.sh25
1 files changed, 7 insertions, 18 deletions
diff --git a/source4/script/tests/test_ldap.sh b/source4/script/tests/test_ldap.sh
index 8d85e5a8e5..57f1160136 100755
--- a/source4/script/tests/test_ldap.sh
+++ b/source4/script/tests/test_ldap.sh
@@ -1,34 +1,23 @@
#!/bin/sh
# test some simple LDAP and CLDAP operations
-if [ $# -lt 3 ]; then
-cat <<EOF
-Usage: test_ldap.sh SERVER USERNAME PASSWORD
-EOF
-exit 1;
-fi
-
-SERVER="$1"
-USERNAME="$2"
-PASSWORD="$3"
-
incdir=`dirname $0`
. $incdir/test_functions.sh
p=ldap
-for options in "" "--option=socket:testnonblock=true" "-U$USERNAME%$PASSWORD --option=socket:testnonblock=true" "-U$USERNAME%$PASSWORD"; do
- plantest "TESTING PROTOCOL $p with options $options" ldap ../testprogs/blackbox/test_ldb.sh $p $SERVER $options
+for options in "" "--option=socket:testnonblock=true" "-U\$USERNAME%\$PASSWORD --option=socket:testnonblock=true" "-U\$USERNAME%\$PASSWORD"; do
+ plantest "TESTING PROTOCOL $p with options $options" dc ../testprogs/blackbox/test_ldb.sh $p \$SERVER $options
done
# see if we support ldaps
if grep ENABLE_GNUTLS.1 include/config.h > /dev/null; then
p=ldaps
- for options in "" "-U$USERNAME%$PASSWORD"; do
- plantest "TESTING PROTOCOL $p with options $options" ldap ../testprogs/blackbox/test_ldb.sh $p $SERVER $options
+ for options in "" "-U\$USERNAME%\$PASSWORD"; do
+ plantest "TESTING PROTOCOL $p with options $options" dc ../testprogs/blackbox/test_ldb.sh $p \$SERVER $options
done
fi
for t in LDAP-CLDAP LDAP-BASIC LDAP-SCHEMA LDAP-UPTODATENESS
do
- plantest "$t" ldap bin/smbtorture $TORTURE_OPTIONS "-U$USERNAME%$PASSWORD" //$SERVER/_none_ $t
+ plantest "$t" dc bin/smbtorture $TORTURE_OPTIONS "-U\$USERNAME%\$PASSWORD" //\$SERVER/_none_ $t
done
# only do the ldb tests when not in quick mode - they are quite slow, and ldb
@@ -36,9 +25,9 @@ done
test "$TORTURE_QUICK" = "yes" || {
LDBDIR=lib/ldb
export LDBDIR
- plantest "ldb" ldap $LDBDIR/tests/test-tdb.sh
+ plantest "ldb" dc $LDBDIR/tests/test-tdb.sh
}
SCRIPTDIR=../testprogs/ejs
-plantest "ejs ldap" ldap $SCRIPTDIR/ldap.js $CONFIGURATION $SERVER -U$USERNAME%$PASSWORD
+plantest "ejs ldap" dc $SCRIPTDIR/ldap.js $CONFIGURATION \$SERVER -U\$USERNAME%\$PASSWORD