1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

selftest: Do an ldapcmp run against the upgraded domain

This checks (with a set of known issues marked in the --filter attribute) that the upgraded
domain matches a fresh provision.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Andrew Bartlett 2013-02-14 15:01:10 +11:00 committed by Stefan Metzmacher
parent 24c4d818d1
commit 72f73ebaff

View File

@ -73,6 +73,18 @@ upgradeprovision_full() {
$PYTHON $BINDIR/samba_upgradeprovision -s "$PREFIX_ABS/alpha13_upgrade_full/etc/smb.conf" --full --debugchange
}
samba_upgradedns() {
$PYTHON $BINDIR/samba_upgradedns --dns-backend=SAMBA_INTERNAL -s "$PREFIX_ABS/alpha13_upgrade_full/etc/smb.conf"
}
referenceprovision() {
$PYTHON $BINDIR/samba-tool domain provision --server-role="dc" --domain=SAMBA --host-name=ares --realm=alpha13.samba.corp --targetdir=$PREFIX_ABS/alpha13_upgrade_reference --use-ntvfs
}
ldapcmp() {
$PYTHON $BINDIR/samba-tool ldapcmp tdb://$PREFIX_ABS/alpha13_upgrade_reference/private/sam.ldb tdb://$PREFIX_ABS/alpha13_upgrade_full/private/sam.ldb --two --filter=dNSProperty,dnsRecord,cn,displayName,versionNumber,systemFlags,msDS-HasInstantiatedNCs --skip-missing-dn
}
if [ -d $PREFIX_ABS/alpha13_upgrade ]; then
rm -fr $PREFIX_ABS/alpha13_upgrade
fi
@ -81,6 +93,10 @@ if [ -d $PREFIX_ABS/alpha13_upgrade_full ]; then
rm -fr $PREFIX_ABS/alpha13_upgrade_full
fi
if [ -d $PREFIX_ABS/alpha13_upgrade_reference ]; then
rm -fr $PREFIX_ABS/alpha13_upgrade_reference
fi
if [ -d $alpha13_dir ]; then
testit "alpha13" alpha13
testit "remove_dns_user" remove_dns_user
@ -91,6 +107,9 @@ if [ -d $alpha13_dir ]; then
testit "dbcheck_clean" dbcheck_clean
testit_expect_failure "dbcheck_full" dbcheck_full
testit "dbcheck_full_clean" dbcheck_full_clean
testit "referenceprovision" referenceprovision
testit "samba_upgradedns" samba_upgradedns
testit "ldapcmp" ldapcmp
else
subunit_start_test "alpha13"
subunit_skip_test "alpha13" <<EOF
@ -129,6 +148,18 @@ EOF
subunit_start_test "dbcheck_full_clean"
subunit_skip_test "dbcheck_full_clean" <<EOF
no test provision
EOF
subunit_start_test "samba_dnsupgrade"
subunit_skip_test "samba_dnsupgrade" <<EOF
no test provision
EOF
subunit_start_test "referenceprovision"
subunit_skip_test "referenceprovision" <<EOF
no test provision
EOF
subunit_start_test "ldapcmp"
subunit_skip_test "ldapcmp" <<EOF
no test provision
EOF
fi