summaryrefslogtreecommitdiff
path: root/selftest/target/Samba.pm
diff options
context:
space:
mode:
authorTim Beale <timbeale@catalyst.net.nz>2019-01-17 17:18:48 +1300
committerAndrew Bartlett <abartlet@samba.org>2019-04-11 04:17:10 +0000
commit4336c058cabd0a11f48ae76dff4e15e85013e783 (patch)
tree2081f75f3a23b62f1373bcd6b666159afe792187 /selftest/target/Samba.pm
parent661dc4574110b0f13c127c8aa6ed0c385292b77c (diff)
downloadsamba-4336c058cabd0a11f48ae76dff4e15e85013e783.tar.gz
selftest: Add new 2-DC testenv for live schema upgrade
This adds a new 2-DC testenv that: 1. Provisions an AD DC with 2008R2 schema 2. Joins another AD DC with 2008R2 schema 3. Starts Samba 4. Performs a live schema upgrade on the PDC Testenv targetting in tests.py files for this testenv required that we extend the environment dependencies system to include optional post-startup dependencies specified in ENV_DEPS_POST maps. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Diffstat (limited to 'selftest/target/Samba.pm')
-rw-r--r--selftest/target/Samba.pm17
1 files changed, 17 insertions, 0 deletions
diff --git a/selftest/target/Samba.pm b/selftest/target/Samba.pm
index 6f28a017b17..38b38669dac 100644
--- a/selftest/target/Samba.pm
+++ b/selftest/target/Samba.pm
@@ -25,6 +25,9 @@ sub new($$$$$) {
%Samba::ENV_DEPS = (%Samba3::ENV_DEPS, %Samba4::ENV_DEPS);
our %ENV_DEPS;
+%Samba::ENV_DEPS_POST = (%Samba3::ENV_DEPS_POST, %Samba4::ENV_DEPS_POST);
+our %ENV_DEPS_POST;
+
%Samba::ENV_TARGETS = (
(map { $_ => "Samba3" } keys %Samba3::ENV_DEPS),
(map { $_ => "Samba4" } keys %Samba4::ENV_DEPS),
@@ -59,6 +62,8 @@ sub setup_env($$$)
return $target->{vars}->{$envname};
}
+ $target->{vars}->{$envname} = "";
+
my @dep_vars;
foreach(@{$ENV_DEPS{$envname}}) {
my $vars = $self->setup_env($_, $path);
@@ -87,6 +92,13 @@ sub setup_env($$$)
$target->{vars}->{$envname} = $env;
$target->{vars}->{$envname}->{target} = $target;
+ foreach(@{$ENV_DEPS_POST{$envname}}) {
+ my $vars = $self->setup_env($_, $path);
+ if (not defined($vars)) {
+ return undef;
+ }
+ }
+
return $env;
}
@@ -401,6 +413,7 @@ sub realm_to_ip_mappings
'backupdom.samba.example.com' => 'backupfromdc',
'renamedom.samba.example.com' => 'renamedc',
'labdom.samba.example.com' => 'labdc',
+ 'schema.samba.example.com' => 'liveupgrade1dc',
'samba.example.com' => 'localdc',
);
@@ -473,9 +486,13 @@ sub get_interface($)
customdc => 45,
prockilldc => 46,
proclimitdc => 47,
+ liveupgrade1dc => 48,
+ liveupgrade2dc => 49,
rootdnsforwarder => 64,
+ # Note: that you also need to update dns_hub.py when adding a new
+ # multi-DC testenv
# update lib/socket_wrapper/socket_wrapper.c
# #define MAX_WRAPPED_INTERFACES 64
# if you wish to have more than 64 interfaces