summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-04-06 20:14:54 +0200
committerStefan Metzmacher <metze@samba.org>2011-04-21 14:41:47 +0200
commitf04689ae63a9dfdca6d5eb8679186561d3e450b4 (patch)
treef8ad2c7fcd035b455bd0a37e71994a2ef9e9427d
parente57a23d23f8af229168935681bf3394108df29cd (diff)
downloadsamba-f04689ae63a9dfdca6d5eb8679186561d3e450b4.tar.gz
s4:ldb/tests: add tests for ldbmodify and 'modrdn'
Signed-off-by: Simo Sorce <idra@samba.org> metze
-rwxr-xr-xsource4/lib/ldb/tests/test-generic.sh5
-rw-r--r--source4/lib/ldb/tests/test-modify-modrdn.ldif12
2 files changed, 16 insertions, 1 deletions
diff --git a/source4/lib/ldb/tests/test-generic.sh b/source4/lib/ldb/tests/test-generic.sh
index 8bbb7698fd1..ae9ff7344ad 100755
--- a/source4/lib/ldb/tests/test-generic.sh
+++ b/source4/lib/ldb/tests/test-generic.sh
@@ -22,7 +22,10 @@ $VALGRIND ldbmodify$EXEEXT $LDBDIR/tests/test-modify.ldif || exit 1
echo "Showing modified record"
$VALGRIND ldbsearch$EXEEXT '(uid=uham)' || exit 1
-echo "Rename entry"
+echo "Rename entry with ldbmodify - modrdn"
+$VALGRIND ldbmodify$EXEEXT $LDBDIR/tests/test-modify-modrdn.ldif || exit 1
+
+echo "Rename entry with ldbrename"
OLDDN="cn=Ursula Hampster,ou=Alumni Association,ou=People,o=University of Michigan,c=TEST"
NEWDN="cn=Hampster Ursula,ou=Alumni Association,ou=People,o=University of Michigan,c=TEST"
$VALGRIND ldbrename$EXEEXT "$OLDDN" "$NEWDN" || exit 1
diff --git a/source4/lib/ldb/tests/test-modify-modrdn.ldif b/source4/lib/ldb/tests/test-modify-modrdn.ldif
new file mode 100644
index 00000000000..efa31494626
--- /dev/null
+++ b/source4/lib/ldb/tests/test-modify-modrdn.ldif
@@ -0,0 +1,12 @@
+dn: cn=Ursula Hampster,ou=Alumni Association,ou=People,o=University of Michiga
+ n,c=TEST
+changetype: moddn
+newrdn: cn=Hampster Ursula
+deleteoldrdn: 1
+newsuperior: ou=Alumni Association,ou=People,o=University of Michigan,c=TEST
+
+dn: cn=Hampster Ursula,ou=Alumni Association,ou=People,o=University of Michiga
+ n,c=TEST
+changetype: modrdn
+newrdn: cn=Ursula Hampster
+deleteoldrdn: 1