tests: Rework backup test inheritance to make LP constraints clearer
authorTim Beale <timbeale@catalyst.net.nz>
Thu, 22 Nov 2018 03:56:22 +0000 (16:56 +1300)
committerTim Beale <timbeale@samba.org>
Tue, 27 Nov 2018 05:57:03 +0000 (06:57 +0100)
commit0d15c2be6a2b8b70b9898326e8c5176cbcdb1ca6
tree816ed00d9d6173f9398fd018e1a4885a3688add4
parentcbcd8eec6ea7eb32d4860eefdec5009ff274e967
tests: Rework backup test inheritance to make LP constraints clearer

The backup tests have a special constraint where we always want to use
check_output() over runcmd(). The reason is we need the samba-tool
backup/restore commands executed in a separate process. Otherwise the
global underlying LoadParm can accumulate settings from earlier test
case runs.

We can avoid someone in future inadvertently running runcmd() by
mistake, by simply changing the inheritance so we no longer inherit from
SambaToolCmdTest (so the runcmd functions are no longer present).

The comment explaining this has been moved to the top of the file.

Note that the TestCaseInTempDir inheritance was redundant.
BlackboxTestCase inherits from TestCaseInTempDir (and SambaToolCmdTest
was inheriting from BlackboxTestCase).

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13676

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Tim Beale <timbeale@samba.org>
Autobuild-Date(master): Tue Nov 27 06:57:03 CET 2018 on sn-devel-144
python/samba/tests/domain_backup.py
python/samba/tests/domain_backup_offline.py