selftest: Export DC conf path for special cases
authorTim Beale <timbeale@catalyst.net.nz>
Mon, 11 Feb 2019 04:15:22 +0000 (17:15 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 18 Feb 2019 04:42:09 +0000 (05:42 +0100)
commitaeadf75c24a4af4143e389e2b27d3a90899fb638
treeb7670061012a36b96608e648d4d5776a45e95714
parent8f9bb790bc3b2f587267b9ec01be603b4082e39e
selftest: Export DC conf path for special cases

In a few rare cases, a test needs to assert aspects both client-side and
server-side aspects. A typical example would be the audit logging, which
is exercising client-side behaviour, but also asserting the server-side
logging.

Usually this has involved a kludge in tests.py to either use
socket-wrapper explicitly, or hardcode in the server smb.conf path.

This patch exposes the existing SERVERCONFFILE env variable to the
tests. DC_SERVERCONFFILE has been added for 2 DC testenvs, where we need
the PDC's smb.conf.

The benefit of doing this way is the filepath/testenv-dependency logic
is all self-contained with the Perl code, and it doesn't bleed out into
tests.py as well.

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