summaryrefslogtreecommitdiff
path: root/testprogs
diff options
context:
space:
mode:
authorTim Beale <timbeale@catalyst.net.nz>2018-09-18 16:30:15 +1200
committerAndrew Bartlett <abartlet@samba.org>2018-09-26 07:49:17 +0200
commit696fa6a1e6c615a992a3016ff32405b864b62eec (patch)
treec2c75ac18c13b2f342104891e150d5696dd9fa1e /testprogs
parentce57a800c9bed7e6876cdc0baf3a2d5fdc879ecf (diff)
downloadsamba-696fa6a1e6c615a992a3016ff32405b864b62eec.tar.gz
selftest: Change backup testenvs to use non-default site
Previously (i.e. up until the last patch) the backup/restore commands only worked if the Default-First-Site-Name site was present. If this site didn't exist, then the various restore testenvs would fail to start. This is now fixed, but this patch changes the backupfrom testenv so that it uses a non-default site. This will detect the problem if it is ever re-introduced. To do this we need to change provision_ad_dc() so the extra_provision_options can be specified as an argument. (Note that Perl treats undef the same as an empty array). By default, the restore will add the new DC into the Default-First-Site-Name site. This means the backupfromdc and restored testenvs will now have different sites, so we need to update the ldapcmp filters to exclude site-specific attributes. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13621 Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'testprogs')
-rwxr-xr-xtestprogs/blackbox/ldapcmp_restoredc.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/testprogs/blackbox/ldapcmp_restoredc.sh b/testprogs/blackbox/ldapcmp_restoredc.sh
index 51951ba8ce2..d7a51aebbf2 100755
--- a/testprogs/blackbox/ldapcmp_restoredc.sh
+++ b/testprogs/blackbox/ldapcmp_restoredc.sh
@@ -55,6 +55,9 @@ ldapcmp_with_orig() {
# these are just differences between provisioning a domain and joining a DC
IGNORE_ATTRS="$IGNORE_ATTRS,localPolicyFlags,operatingSystem,displayName"
+ # the restored DC may use a different side compared to the original DC
+ IGNORE_ATTRS="$IGNORE_ATTRS,serverReferenceBL,msDS-IsDomainFor"
+
LDAPCMP_CMD="$PYTHON $BINDIR/samba-tool ldapcmp"
$LDAPCMP_CMD $DB1_PATH $DB2_PATH --two --filter=$IGNORE_ATTRS $BASE_DN_OPTS
}