diff options
Diffstat (limited to 'lib/ldb/tests/test-generic.sh')
-rwxr-xr-x | lib/ldb/tests/test-generic.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/ldb/tests/test-generic.sh b/lib/ldb/tests/test-generic.sh index 9c45ed9614..69f901bd7c 100755 --- a/lib/ldb/tests/test-generic.sh +++ b/lib/ldb/tests/test-generic.sh @@ -16,9 +16,30 @@ $VALGRIND ldbadd $LDBDIR/tests/test.ldif 2> /dev/null && { exit 1 } +echo "Adding LDIF with one already-existing user again - should fail" +$VALGRIND ldbadd $LDBDIR/tests/test-dup.ldif 2> /dev/null && { + echo "Should have failed to add again - gave $?" + exit 1 +} + +echo "Adding again - should succeed (as previous failed)" +$VALGRIND ldbadd $LDBDIR/tests/test-dup-2.ldif || exit 1 + echo "Modifying elements" $VALGRIND ldbmodify $LDBDIR/tests/test-modify.ldif || exit 1 +echo "Modify LDIF with one un-met constraint - should fail" +$VALGRIND ldbadd $LDBDIR/tests/test-modify-unmet.ldif 2> /dev/null && { + echo "Should have failed to modify - gave $?" + exit 1 +} + +echo "Modify LDIF with after failure of un-met constraint - should also fail" +$VALGRIND ldbadd $LDBDIR/tests/test-modify-unmet-2.ldif 2> /dev/null && { + echo "Should have failed to modify - gave $?" + exit 1 +} + echo "Showing modified record" $VALGRIND ldbsearch '(uid=uham)' || exit 1 |