1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-25 06:04:04 +03:00
samba-mirror/source3/lib/ldb/tests/test-schema.sh
Andrew Tridgell 3e2c696e45 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)
2007-10-10 12:14:36 -05:00

35 lines
977 B
Bash
Executable File

#!/bin/sh
LDB_URL="tdb://schema.ldb"
export LDB_URL
rm -f schema.ldb
echo "LDB_URL: $LDB_URL"
echo "Adding schema"
$VALGRIND bin/ldbadd $LDBDIR/tests/schema-tests/schema.ldif || exit 1
echo "Adding few test elements (no failure expected here)"
$VALGRIND bin/ldbadd $LDBDIR/tests/schema-tests/schema-add-test.ldif || exit 1
echo "Modifying elements (2 failures expected here)"
$VALGRIND bin/ldbmodify $LDBDIR/tests/schema-tests/schema-mod-test-1.ldif || exit 1
$VALGRIND bin/ldbmodify $LDBDIR/tests/schema-tests/schema-mod-test-2.ldif || exit 1
$VALGRIND bin/ldbmodify $LDBDIR/tests/schema-tests/schema-mod-test-3.ldif || exit 1
$VALGRIND bin/ldbmodify $LDBDIR/tests/schema-tests/schema-mod-test-4.ldif
if [ "$?" == "0" ]; then
echo "test failed!"
exit 1
fi
$VALGRIND bin/ldbmodify $LDBDIR/tests/schema-tests/schema-mod-test-5.ldif
if [ "$?" == "0" ]; then
echo "test failed!"
exit 1
fi
echo "Showing modified record"
$VALGRIND bin/ldbsearch '(cn=Test)' || exit 1