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

selftest: specifying 2008_R2 base schema for tests that need it

We're going to change the default base schema so this patch changes all
tests and testenvs requiring the current default (2008_R2) to specify it
in all provision commands using --base-schema.

Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Aaron Haslett 2019-01-15 16:30:51 +13:00 committed by Andrew Bartlett
parent 295bf73e9b
commit fc9845da69
2 changed files with 21 additions and 12 deletions

View File

@ -1611,9 +1611,9 @@ sub provision_subdom_dc($$$)
return $ret;
}
sub provision_ad_dc_ntvfs($$)
sub provision_ad_dc_ntvfs($$$)
{
my ($self, $prefix) = @_;
my ($self, $prefix, $extra_provision_options) = @_;
# We keep the old 'winbind' name here in server services to
# ensure upgrades which used that name still work with the now
@ -1633,7 +1633,7 @@ sub provision_ad_dc_ntvfs($$)
dsdb group change notification = true
server schannel = auto
";
my $extra_provision_options = ["--use-ntvfs"];
push (@{$extra_provision_options}, "--use-ntvfs");
my $ret = $self->provision($prefix,
"domain controller",
"localdc",
@ -1669,7 +1669,7 @@ sub provision_fl2000dc($$)
spnego:simulate_w2k=yes
ntlmssp_server:force_old_spnego=yes
";
my $extra_provision_options = ["--use-ntvfs"];
my $extra_provision_options = ["--use-ntvfs", "--base-schema=2008_R2"];
# This environment uses plain text secrets
# i.e. secret attributes are not encrypted on disk.
# This allows testing of the --plaintext-secrets option for
@ -1711,7 +1711,7 @@ sub provision_fl2003dc($$$)
dcesrv:header signing = no
dcesrv:max auth states = 0
dns forwarder = $ip_addr1 $ip_addr2";
my $extra_provision_options = ["--use-ntvfs"];
my $extra_provision_options = ["--use-ntvfs", "--base-schema=2008_R2"];
my $ret = $self->provision($prefix,
"domain controller",
"dc6",
@ -1761,7 +1761,7 @@ sub provision_fl2008r2dc($$$)
print "PROVISIONING DC WITH FOREST LEVEL 2008r2...\n";
my $extra_conf_options = "ldap server require strong auth = no";
my $extra_provision_options = ["--use-ntvfs"];
my $extra_provision_options = ["--use-ntvfs", "--base-schema=2008_R2"];
my $ret = $self->provision($prefix,
"domain controller",
"dc7",
@ -2268,8 +2268,17 @@ sub return_alias_env
sub setup_fl2008dc
{
my ($self, $path, $dep_env) = @_;
return $self->return_alias_env($path, $dep_env)
my ($self, $path) = @_;
my $extra_args = ["--base-schema=2008_R2"];
my $env = $self->provision_ad_dc_ntvfs($path, $extra_args);
if (defined $env) {
if (not defined($self->check_or_start($env, "standard"))) {
warn("Failed to start fl2008dc");
return undef;
}
}
return $env;
}
sub setup_ad_dc_default
@ -2339,7 +2348,7 @@ sub setup_ad_dc_ntvfs
{
my ($self, $path) = @_;
my $env = $self->provision_ad_dc_ntvfs($path);
my $env = $self->provision_ad_dc_ntvfs($path, undef);
if (defined $env) {
if (not defined($self->check_or_start($env, "standard"))) {
warn("Failed to start ad_dc_ntvfs");

View File

@ -18,14 +18,14 @@ upgradeprovision_reference() {
if [ -d $PREFIX/upgradeprovision_reference ]; then
rm -fr $PREFIX/upgradeprovision_reference
fi
$PYTHON $BINDIR/samba-tool domain provision --host-name=bar --domain=FOO --realm=foo.example.com --targetdir="$PREFIX/upgradeprovision_reference" --server-role="dc" --use-ntvfs
$PYTHON $BINDIR/samba-tool domain provision --host-name=bar --domain=FOO --realm=foo.example.com --targetdir="$PREFIX/upgradeprovision_reference" --server-role="dc" --use-ntvfs --base-schema=2008_R2
}
upgradeprovision() {
if [ -d $PREFIX/upgradeprovision ]; then
rm -fr $PREFIX/upgradeprovision
fi
$PYTHON $BINDIR/samba-tool domain provision --host-name=bar --domain=FOO --realm=foo.example.com --targetdir="$PREFIX/upgradeprovision" --server-role="dc" --use-ntvfs
$PYTHON $BINDIR/samba-tool domain provision --host-name=bar --domain=FOO --realm=foo.example.com --targetdir="$PREFIX/upgradeprovision" --server-role="dc" --use-ntvfs --base-schema=2008_R2
$PYTHON $BINDIR/samba_upgradeprovision -s "$PREFIX/upgradeprovision/etc/smb.conf" --debugchange
}
@ -33,7 +33,7 @@ upgradeprovision_full() {
if [ -d $PREFIX/upgradeprovision_full ]; then
rm -fr $PREFIX/upgradeprovision_full
fi
$PYTHON $BINDIR/samba-tool domain provision --host-name=bar --domain=FOO --realm=foo.example.com --targetdir="$PREFIX/upgradeprovision_full" --server-role="dc" --use-ntvfs
$PYTHON $BINDIR/samba-tool domain provision --host-name=bar --domain=FOO --realm=foo.example.com --targetdir="$PREFIX/upgradeprovision_full" --server-role="dc" --use-ntvfs --base-schema=2008_R2
$PYTHON $BINDIR/samba_upgradeprovision -s "$PREFIX/upgradeprovision_full/etc/smb.conf" --full --debugchange
}