From 3e2c696e45b24b0192ab7b1ddaf1dd4d79571609 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 24 Sep 2006 02:49:04 +0000 Subject: r18866: Jeremy and Volker have given the go-ahead on the group mapping ldb code. Yay! This first commit copies lib/ldb/ from Samba4. A huge congratulations should go to Simo on this - he has put an enormous amount of work into ldb, and it's great to see it go into the Samba3 tree. (This used to be commit bbedf2e34315f5c420a3a05dfe22b1d5cf79f042) --- source3/lib/ldb/tests/init.ldif | 40 ++ source3/lib/ldb/tests/init_slapd.sh | 41 ++ source3/lib/ldb/tests/kill_slapd.sh | 12 + source3/lib/ldb/tests/ldapi_url.sh | 11 + source3/lib/ldb/tests/photo.ldif | 5 + source3/lib/ldb/tests/samba4.png | Bin 0 -> 6239 bytes .../ldb/tests/schema-tests/schema-add-test.ldif | 66 ++++ .../ldb/tests/schema-tests/schema-mod-test-1.ldif | 5 + .../ldb/tests/schema-tests/schema-mod-test-2.ldif | 5 + .../ldb/tests/schema-tests/schema-mod-test-3.ldif | 5 + .../ldb/tests/schema-tests/schema-mod-test-4.ldif | 5 + .../ldb/tests/schema-tests/schema-mod-test-5.ldif | 5 + source3/lib/ldb/tests/schema-tests/schema.ldif | 112 ++++++ source3/lib/ldb/tests/slapd.conf | 26 ++ source3/lib/ldb/tests/start_slapd.sh | 14 + source3/lib/ldb/tests/test-attribs.ldif | 15 + source3/lib/ldb/tests/test-config.ldif | 67 ++++ source3/lib/ldb/tests/test-default-config.ldif | 17 + source3/lib/ldb/tests/test-extended.sh | 69 ++++ source3/lib/ldb/tests/test-generic.sh | 119 ++++++ source3/lib/ldb/tests/test-index.ldif | 11 + source3/lib/ldb/tests/test-ldap.sh | 54 +++ source3/lib/ldb/tests/test-modify.ldif | 23 ++ source3/lib/ldb/tests/test-schema.sh | 34 ++ source3/lib/ldb/tests/test-sqlite3.sh | 22 ++ source3/lib/ldb/tests/test-tdb-features.sh | 119 ++++++ source3/lib/ldb/tests/test-tdb.sh | 24 ++ source3/lib/ldb/tests/test-wildcard.ldif | 5 + source3/lib/ldb/tests/test-wrong_attributes.ldif | 3 + source3/lib/ldb/tests/test.ldif | 416 +++++++++++++++++++++ source3/lib/ldb/tests/testdata.txt | 8 + source3/lib/ldb/tests/testsearch.txt | 5 + 32 files changed, 1363 insertions(+) create mode 100644 source3/lib/ldb/tests/init.ldif create mode 100755 source3/lib/ldb/tests/init_slapd.sh create mode 100755 source3/lib/ldb/tests/kill_slapd.sh create mode 100755 source3/lib/ldb/tests/ldapi_url.sh create mode 100644 source3/lib/ldb/tests/photo.ldif create mode 100644 source3/lib/ldb/tests/samba4.png create mode 100644 source3/lib/ldb/tests/schema-tests/schema-add-test.ldif create mode 100644 source3/lib/ldb/tests/schema-tests/schema-mod-test-1.ldif create mode 100644 source3/lib/ldb/tests/schema-tests/schema-mod-test-2.ldif create mode 100644 source3/lib/ldb/tests/schema-tests/schema-mod-test-3.ldif create mode 100644 source3/lib/ldb/tests/schema-tests/schema-mod-test-4.ldif create mode 100644 source3/lib/ldb/tests/schema-tests/schema-mod-test-5.ldif create mode 100644 source3/lib/ldb/tests/schema-tests/schema.ldif create mode 100644 source3/lib/ldb/tests/slapd.conf create mode 100755 source3/lib/ldb/tests/start_slapd.sh create mode 100644 source3/lib/ldb/tests/test-attribs.ldif create mode 100644 source3/lib/ldb/tests/test-config.ldif create mode 100644 source3/lib/ldb/tests/test-default-config.ldif create mode 100755 source3/lib/ldb/tests/test-extended.sh create mode 100755 source3/lib/ldb/tests/test-generic.sh create mode 100644 source3/lib/ldb/tests/test-index.ldif create mode 100755 source3/lib/ldb/tests/test-ldap.sh create mode 100644 source3/lib/ldb/tests/test-modify.ldif create mode 100755 source3/lib/ldb/tests/test-schema.sh create mode 100755 source3/lib/ldb/tests/test-sqlite3.sh create mode 100644 source3/lib/ldb/tests/test-tdb-features.sh create mode 100755 source3/lib/ldb/tests/test-tdb.sh create mode 100644 source3/lib/ldb/tests/test-wildcard.ldif create mode 100644 source3/lib/ldb/tests/test-wrong_attributes.ldif create mode 100644 source3/lib/ldb/tests/test.ldif create mode 100644 source3/lib/ldb/tests/testdata.txt create mode 100644 source3/lib/ldb/tests/testsearch.txt (limited to 'source3/lib/ldb/tests') diff --git a/source3/lib/ldb/tests/init.ldif b/source3/lib/ldb/tests/init.ldif new file mode 100644 index 0000000000..2e0b83c769 --- /dev/null +++ b/source3/lib/ldb/tests/init.ldif @@ -0,0 +1,40 @@ +dn: o=University of Michigan,c=TEST +objectclass: organization +objectclass: domainRelatedObject +l: Ann Arbor, Michigan +st: Michigan +o: University of Michigan +o: UMICH +o: UM +o: U-M +o: U of M +description: The University of Michigan at Ann Arbor +seeAlso: +postaladdress: University of Michigan $ 535 W. William St. $ Ann Arbor, MI 481 + 09 $ US +telephonenumber: +1 313 764-1817 +associateddomain: example.com + +dn: ou=People,o=University of Michigan,c=TEST +objectclass: organizationalUnit +objectclass: extensibleObject +ou: People +uidNumber: 0 +gidNumber: 0 + +dn: ou=Ldb Test,ou=People,o=University of Michigan,c=TEST +objectclass: organizationalUnit +objectclass: extensibleObject +ou: People +ou: Ldb Test +uidNumber: 0 +gidNumber: 0 + +dn: ou=LdbTspace,ou=People,o=University of Michigan,c=TEST +objectclass: organizationalUnit +objectclass: extensibleObject +ou: People +ou: LdbTspace +description: test white space removal in comparisons +uidNumber: 0 +gidNumber: 0 diff --git a/source3/lib/ldb/tests/init_slapd.sh b/source3/lib/ldb/tests/init_slapd.sh new file mode 100755 index 0000000000..cf06acd08b --- /dev/null +++ b/source3/lib/ldb/tests/init_slapd.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +if [ -z "$LDBDIR" ]; then + LDBDIR=`dirname $0`/.. + export LDBDIR +fi + +rm -rf tests/tmp/db +mkdir -p tests/tmp/db + +if [ -f tests/tmp/slapd.pid ]; then + kill `cat tests/tmp/slapd.pid` + sleep 1 +fi +if [ -f tests/tmp/slapd.pid ]; then + kill -9 `cat tests/tmp/slapd.pid` + rm -f tests/tmp/slapd.pid +fi + +# we don't consider a slapadd failure as a test suite failure, as it +# has nothing to do with ldb + +MODCONF=tests/tmp/modules.conf +rm -f $MODCONF +touch $MODCONF || exit 1 + +slaptest -u -f $LDBDIR/tests/slapd.conf > /dev/null 2>&1 || { + echo "enabling sladp modules" +cat > $MODCONF <