samba-tool: Ensure commands don't crash without ad-dc
authorDavid Mulder <dmulder@suse.com>
Thu, 17 Jun 2021 21:20:41 +0000 (15:20 -0600)
committerAndrew Bartlett <abartlet@samba.org>
Sun, 20 Jun 2021 22:06:36 +0000 (22:06 +0000)
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 <dmulder@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/selftest/tests.py

index ef095001cdb6ae94b5973fac2c0021b0ae80a333..aec57881ff0e0ecaf9c9e494c06d76a453f5d459 100755 (executable)
@@ -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")