From: David Mulder Date: Thu, 17 Jun 2021 21:20:41 +0000 (-0600) Subject: samba-tool: Ensure commands don't crash without ad-dc X-Git-Tag: tevent-0.11.0~318 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a45ea91cd7e8335319c96ea5bda02014f584df63;p=thirdparty%2Fsamba.git samba-tool: Ensure commands don't crash without ad-dc This simply ensures against import errors when samba is built without the ad-dc. Calling every help message guarantees the imports succeeded. The test is intentionally run against the fileserver test environment, because it's configured --without-ad-dc and does not disable ads. Signed-off-by: David Mulder Reviewed-by: Andrew Bartlett --- diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py index ef095001cdb..aec57881ff0 100755 --- a/source4/selftest/tests.py +++ b/source4/selftest/tests.py @@ -811,6 +811,13 @@ planpythontestsuite("none", "samba.tests.samba_tool.provision_password_check") planpythontestsuite("none", "samba.tests.samba_tool.provision_lmdb_size") planpythontestsuite("none", "samba.tests.samba_tool.provision_userPassword_crypt") planpythontestsuite("none", "samba.tests.samba_tool.help") +# Make sure samba-tool can execute without import failures when run +# without the ad-dc built. The fileserver test environment runs against +# the samba-h5l-build autobuild. This build was chosen because it's +# configured with --without-ad-dc and does not disable ads, which is +# required to run some samba-tool commands. +planpythontestsuite("fileserver", "samba.tests.samba_tool.help") + planpythontestsuite("ad_dc_default:local", "samba.tests.samba_tool.passwordsettings") planpythontestsuite("ad_dc:local", "samba.tests.samba_tool.dsacl")