summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tests
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-08-29 15:54:10 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:34:55 -0500
commit0a72d9a5f7c8705a68b03e2f391603252d896342 (patch)
treee90e15175709ee7e9547317129f4754b21277e88 /source4/lib/ldb/tests
parent0549763600b26fadac443555e1cbec5680f91340 (diff)
downloadsamba-0a72d9a5f7c8705a68b03e2f391603252d896342.tar.gz
samba-0a72d9a5f7c8705a68b03e2f391603252d896342.tar.bz2
samba-0a72d9a5f7c8705a68b03e2f391603252d896342.zip
r9744: - [upgrade.js] Start working on smb.conf conversion.
- [ldb_map] Support storing non-mappable data in a fallback LDB (This used to be commit 435e4c6389b9d9b545beec8036289620ee5883db)
Diffstat (limited to 'source4/lib/ldb/tests')
-rwxr-xr-xsource4/lib/ldb/tests/test-samba3sam.sh39
1 files changed, 23 insertions, 16 deletions
diff --git a/source4/lib/ldb/tests/test-samba3sam.sh b/source4/lib/ldb/tests/test-samba3sam.sh
index 988806d895..995a513d54 100755
--- a/source4/lib/ldb/tests/test-samba3sam.sh
+++ b/source4/lib/ldb/tests/test-samba3sam.sh
@@ -1,39 +1,49 @@
#!/bin/sh
-rm -f samba3.ldb
+rm -f samba3.ldb samba4.ldb
echo "Adding samba3 LDIF..."
$VALGRIND ldbadd -H tdb://samba3.ldb < samba3.ldif || exit 1
-LOC="-H tdb://samba3.ldb"
-OPT="-o modules:samba3sam $LOC"
+echo "Adding samba4 LDIF..."
+$VALGRIND ldbadd -H tdb://samba4.ldb <<EOF
+dn: @MODULES
+@LIST: samba3sam
+
+dn: @MAP=samba3sam
+@MAP_URL: tdb://samba3.ldb
+
+EOF
+
+LOC="-H tdb://samba4.ldb"
echo "Looking up by non-mapped attribute"
-$VALGRIND ldbsearch $OPT "(cn=Administrator)" || exit 1
+$VALGRIND ldbsearch $LOC "(cn=Administrator)" || exit 1
echo "Looking up by mapped attribute"
-$VALGRIND ldbsearch $OPT "(name=Backup Operators)" || exit 1
+$VALGRIND ldbsearch $LOC "(name=Backup Operators)" || exit 1
echo "Looking up by old name of renamed attribute"
-$VALGRIND ldbsearch $OPT "(displayName=Backup Operators)" || exit 1
+$VALGRIND ldbsearch $LOC "(displayName=Backup Operators)" || exit 1
echo "Adding a record"
-$VALGRIND ldbadd $OPT <<EOF
+$VALGRIND ldbadd $LOC <<EOF
dn: cn=Foo,dc=idealx,dc=org
unixName: root
lastLogon: 20000
cn: Foo
+showInAdvancedViewOnly: TRUE
EOF
-echo "Checking for existance of record (mapped)"
-$VALGRIND ldbsearch $OPT "(cn=Foo)" unixName lastLogon cn || exit 1
+echo "Checking for existance of record"
+$VALGRIND ldbsearch $LOC "(cn=Foo)" unixName lastLogon cn showInAdvancedViewOnly || exit 1
-echo "Checking for existance of record (non-mapped)"
-$VALGRIND ldbsearch $LOC"(cn=foo)" uid sambaLogonTime cn || exit 1
+echo "Checking for persistence of non-mappable attribute"
+$VALGRIND ldbsearch $LOC "(cn=Foo)" showInAdvancedViewOnly | grep showInAdvancedViewOnly || exit 1
echo "Adding record with mapped attribute in dn"
-$VALGRIND ldbadd $OPT <<EOF
+$VALGRIND ldbadd $LOC <<EOF
dn: unixName=nobody,dc=idealx,dc=org
unixName: nobody
cn: Niemand
@@ -41,7 +51,4 @@ cn: Niemand
EOF
echo "Checking for existance of record (mapped)"
-$VALGRIND ldbsearch $OPT "(unixName=nobody)" unixName cn dn || exit 1
-
-echo "Checking for existance of record (non-mapped)"
-$VALGRIND ldbsearch $OPT "(uid=nobody)" unixName cn dn || exit 1
+$VALGRIND ldbsearch $LOC "(unixName=nobody)" unixName cn dn || exit 1