tests/dbcheck: Provision using the old schema and ignore displayName
authorGarming Sam <garming@catalyst.net.nz>
Tue, 27 Feb 2018 23:17:46 +0000 (12:17 +1300)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 1 Mar 2018 08:53:45 +0000 (09:53 +0100)
These tests are currently not run on Ubuntu due to bashisms in the test.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
testprogs/blackbox/dbcheck-oldrelease.sh

index 55e6ddf4f02bde8afc19b264db20ac90a0151988..0949d324aaafeb5a888f807eca0dc38319ca9bc5 100755 (executable)
@@ -367,13 +367,16 @@ check_expected_after_deleted_objects() {
 
 referenceprovision() {
     if [ x$RELEASE == x"release-4-0-0" ]; then
-        $PYTHON $BINDIR/samba-tool domain provision --server-role="dc" --domain=SAMBA --host-name=ares --realm=${RELEASE}.samba.corp --targetdir=$PREFIX_ABS/${RELEASE}_reference --use-ntvfs --host-ip=127.0.0.1 --host-ip6=::1 --function-level=2003
+        $PYTHON $BINDIR/samba-tool domain provision --server-role="dc" --domain=SAMBA --host-name=ares --realm=${RELEASE}.samba.corp --targetdir=$PREFIX_ABS/${RELEASE}_reference --use-ntvfs --host-ip=127.0.0.1 --host-ip6=::1 --function-level=2003 --base-schema=2008_R2_old
+
+        # on top of this, also apply 2008R2 changes we accidentally missed in the past
+        $PYTHON $BINDIR/samba-tool domain schemaupgrade -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb --ldf-file=samba-4.7-missing-for-schema45.ldif,fix-forest-rev.ldf
     fi
 }
 
 ldapcmp() {
     if [ x$RELEASE == x"release-4-0-0" ]; then
-         $PYTHON $BINDIR/samba-tool ldapcmp tdb://$PREFIX_ABS/${RELEASE}_reference/private/sam.ldb tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb --two --skip-missing-dn --filter=dnsRecord
+         $PYTHON $BINDIR/samba-tool ldapcmp tdb://$PREFIX_ABS/${RELEASE}_reference/private/sam.ldb tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb --two --skip-missing-dn --filter=dnsRecord,displayName
     fi
 }