1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-20 08:23:50 +03:00
Files
samba-mirror/source/lib/ldb/tests/test-schema.sh
Simo Sorce 0315159daf r4862: - better structure schema tests
- fix check for deletion of required attributes on modify
  removed by mistake with the previous commits
2007-10-10 13:09:00 -05:00

34 lines
913 B
Bash
Executable File

#!/bin/sh
export LDB_URL="tdb://schema.ldb"
rm -f schema.ldb
echo "LDB_URL: $LDB_URL"
echo "Adding schema"
$VALGRIND bin/ldbadd tests/schema-tests/schema.ldif || exit 1
echo "Adding few test elements (no failure expected here)"
$VALGRIND bin/ldbadd tests/schema-tests/schema-add-test.ldif || exit 1
echo "Modifying elements (2 failures expected here)"
$VALGRIND bin/ldbmodify tests/schema-tests/schema-mod-test-1.ldif || exit 1
$VALGRIND bin/ldbmodify tests/schema-tests/schema-mod-test-2.ldif || exit 1
$VALGRIND bin/ldbmodify tests/schema-tests/schema-mod-test-3.ldif || exit 1
$VALGRIND bin/ldbmodify tests/schema-tests/schema-mod-test-4.ldif
if [ "$?" == "0" ]; then
echo "test failed!"
exit 1
fi
$VALGRIND bin/ldbmodify 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