summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tests
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-01-02 09:46:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:07:56 -0500
commit09a76e204cf339862f8b0b45979d65cc34aa3c36 (patch)
tree4d533b65f33d04d5b76d3435ad41b54c2998df44 /source4/lib/ldb/tests
parent62ffbdb9f1d9ded63f6d8623f14741145a2d6b47 (diff)
downloadsamba-09a76e204cf339862f8b0b45979d65cc34aa3c36.tar.gz
samba-09a76e204cf339862f8b0b45979d65cc34aa3c36.tar.bz2
samba-09a76e204cf339862f8b0b45979d65cc34aa3c36.zip
r4477: expanded the test suite to increase code coverage a lot
(This used to be commit 4edbd1b18ee38e584cf844b64c7fcb2645921837)
Diffstat (limited to 'source4/lib/ldb/tests')
-rwxr-xr-xsource4/lib/ldb/tests/test-generic.sh6
-rw-r--r--source4/lib/ldb/tests/test-index.ldif13
-rw-r--r--source4/lib/ldb/tests/test.ldif2
3 files changed, 15 insertions, 6 deletions
diff --git a/source4/lib/ldb/tests/test-generic.sh b/source4/lib/ldb/tests/test-generic.sh
index 4fb54b6c3b..2b2ab2e78a 100755
--- a/source4/lib/ldb/tests/test-generic.sh
+++ b/source4/lib/ldb/tests/test-generic.sh
@@ -27,11 +27,15 @@ $VALGRIND bin/ldbadd tests/test-index.ldif || exit 1
echo "testing indexed search"
$VALGRIND bin/ldbsearch '(uid=uham)' || exit 1
+$VALGRIND bin/ldbsearch '(&(objectclass=person)(objectclass=person)(objectclass=top))' || exit 1
$VALGRIND bin/ldbsearch '(&(uid=uham)(uid=uham))' || exit 1
$VALGRIND bin/ldbsearch '(|(uid=uham)(uid=uham))' || exit 1
$VALGRIND bin/ldbsearch '(|(uid=uham)(uid=uham)(objectclass=OpenLDAPperson))' || exit 1
$VALGRIND bin/ldbsearch '(&(uid=uham)(uid=uham)(!(objectclass=xxx)))' || exit 1
-$VALGRIND bin/ldbsearch '(&(uid=uham)(!(uid=uhamxx)))' || exit 1
+$VALGRIND bin/ldbsearch '(&(objectclass=person)(uid=uham)(!(uid=uhamxx)))' uid \* \+ dn || exit 1
+$VALGRIND bin/ldbsearch '(&(uid=uham)(uid=uha*)(title=*))' uid || exit 1
+$VALGRIND bin/ldbsearch '((' uid && exit 1
+$VALGRIND bin/ldbsearch 'dn=cn=Hampster Ursula,ou=Alumni Association,ou=People,o=University of Michigan,c=US' uid || exit 1
echo "Starting ldbtest indexed"
time $VALGRIND bin/ldbtest -r 1000 -s 5000 || exit 1
diff --git a/source4/lib/ldb/tests/test-index.ldif b/source4/lib/ldb/tests/test-index.ldif
index 6b2e921ebd..24ac408764 100644
--- a/source4/lib/ldb/tests/test-index.ldif
+++ b/source4/lib/ldb/tests/test-index.ldif
@@ -1,6 +1,11 @@
dn: @INDEXLIST
@IDXATTR: uid
-# it is much better not to index on objectclass if nearly
-# all the records are the same class (the index is expensive
-# to maintain, and doesn't really gain anything)
-# @IDXATTR: objectclass
+@IDXATTR: objectclass
+
+dn: @ATTRIBUTES
+uid: CASE_INSENSITIVE WILDCARD
+
+dn: @SUBCLASSES
+top: person
+person: organizationalPerson
+organizationalPerson: OpenLDAPperson
diff --git a/source4/lib/ldb/tests/test.ldif b/source4/lib/ldb/tests/test.ldif
index 8d6c0c750e..7fe3a8ffd7 100644
--- a/source4/lib/ldb/tests/test.ldif
+++ b/source4/lib/ldb/tests/test.ldif
@@ -212,7 +212,7 @@ objectclass: OpenLDAPperson
cn: Barbara Jensen
cn: Babs Jensen
sn:: IEplbnNlbiA=
-uid: bjensen
+uid:: YmplCW5zZW4
title: Mythical Manager, Research Systems
postaladdress: ITD Prod Dev & Deployment $ 535 W. William St. Room 4212 $ Ann
Arbor, MI 48103-4943