summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tests
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/tests')
-rw-r--r--source4/lib/ldb/tests/test-generic.sh8
-rwxr-xr-xsource4/lib/ldb/tests/test-ldap.sh8
-rw-r--r--source4/lib/ldb/tests/test-modify.ldif14
-rwxr-xr-xsource4/lib/ldb/tests/test-tdb.sh8
4 files changed, 38 insertions, 0 deletions
diff --git a/source4/lib/ldb/tests/test-generic.sh b/source4/lib/ldb/tests/test-generic.sh
new file mode 100644
index 0000000000..41f5707e9c
--- /dev/null
+++ b/source4/lib/ldb/tests/test-generic.sh
@@ -0,0 +1,8 @@
+echo "Adding base elements"
+bin/ldbadd < tests/test.ldif
+
+echo "Modifying elements"
+bin/ldbmodify < tests/test-modify.ldif
+
+echo "Showing modified record"
+bin/ldbsearch '(uid=uham)'
diff --git a/source4/lib/ldb/tests/test-ldap.sh b/source4/lib/ldb/tests/test-ldap.sh
new file mode 100755
index 0000000000..29b40ff455
--- /dev/null
+++ b/source4/lib/ldb/tests/test-ldap.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+tests/init_slapd.sh
+tests/start_slapd.sh
+
+export LDB_URL=`tests/ldapi_url.sh`
+
+. tests/test-generic.sh
diff --git a/source4/lib/ldb/tests/test-modify.ldif b/source4/lib/ldb/tests/test-modify.ldif
new file mode 100644
index 0000000000..521c6d8b56
--- /dev/null
+++ b/source4/lib/ldb/tests/test-modify.ldif
@@ -0,0 +1,14 @@
+dn: cn=Ursula Hampster,ou=Alumni Association,ou=People,o=University of Michiga
+ n,c=US
+changetype: modify
+add: drink
+drink: mango lassi
+-
+delete: pager
+-
+replace: telephonenumber
+telephonenumber: +61 2 6260 6012
+telephonenumber: +61 412 666 929
+-
+delete: telephonenumber
+telephonenumber: +61 2 6260 6012
diff --git a/source4/lib/ldb/tests/test-tdb.sh b/source4/lib/ldb/tests/test-tdb.sh
new file mode 100755
index 0000000000..1e21accac5
--- /dev/null
+++ b/source4/lib/ldb/tests/test-tdb.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+
+export LDB_URL="tdb://test.ldb"
+
+rm -f test.ldb
+
+. tests/test-generic.sh