From 72f73ebaff8d75fc39770ec785964b0d3c9738cc Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 14 Feb 2013 15:01:10 +1100 Subject: 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 --- testprogs/blackbox/upgradeprovision-alpha13.sh | 31 ++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'testprogs') diff --git a/testprogs/blackbox/upgradeprovision-alpha13.sh b/testprogs/blackbox/upgradeprovision-alpha13.sh index 1747c7b4e9..16731b1077 100755 --- a/testprogs/blackbox/upgradeprovision-alpha13.sh +++ b/testprogs/blackbox/upgradeprovision-alpha13.sh @@ -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" <