selftest: Add helper function to avoid repeated {DC_SERVER}=x
authorTim Beale <timbeale@catalyst.net.nz>
Wed, 13 Feb 2019 02:52:00 +0000 (15:52 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 18 Feb 2019 04:42:10 +0000 (05:42 +0100)
commit31c5d4c969c584c54ec20b0f9ae4d0a18d517b4c
tree31edf6b796ba1d3654983048dd08fbd6bb0203f6
parentbc4c04380f1446c3732644cd656ff387b1d40188
selftest: Add helper function to avoid repeated {DC_SERVER}=x

For every 2-DC testenv we setup, we copy the $DC_SERVER value of the
dependent testenv (i.e. the PDC) into the env variables for the new
testenv. This means DC_SERVER always points to the PDC (or first DC).

This adds a helper function to avoid repeating this code for every 2-DC
environment we setup.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
selftest/target/Samba4.pm