tests: Add tests for samba-tool passwordsettings commands
authorTim Beale <timbeale@catalyst.net.nz>
Thu, 10 May 2018 04:22:06 +0000 (16:22 +1200)
committerGarming Sam <garming@samba.org>
Fri, 11 May 2018 07:06:10 +0000 (09:06 +0200)
commit569937b8008ea8b64b4e3ead61ebc97c6c41f6b6
tree3c7582f2716a24860093f87246f284d948aab3bb
parent7255e0ced33826d1e528c3e465105e7e194eb36e
tests: Add tests for samba-tool passwordsettings commands

I've added a test case for 'samba-tool domain passwordsettings set/show'
to prove I haven't broken it. It's behaviour shouldn't have changed, but
there was no test for it previously.

We'll extend these tests in the very near future, when we add samba-tool
support for managing PSOs.

The base samba_tool test's runsubcmd() only handled commands with
exactly one sub-command, i.e. it would handle the command 'samba-tool
domain passwordsettings' OK, but not 'samba-tool domain passwordsettings
set' (The command still seemed to run OK, but you wouldn't get the
output/err back correctly). A new runsublevelcmd() function now handles
a varying number of sub-commands.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Fri May 11 09:06:10 CEST 2018 on sn-devel-144
python/samba/tests/samba_tool/base.py
python/samba/tests/samba_tool/passwordsettings.py [new file with mode: 0644]
source4/selftest/tests.py