tests: Add PSO test case to existing password_lockout tests
authorTim Beale <timbeale@catalyst.net.nz>
Sun, 18 Mar 2018 23:56:14 +0000 (12:56 +1300)
committerGarming Sam <garming@samba.org>
Fri, 11 May 2018 04:01:24 +0000 (06:01 +0200)
commitf94f472830d684683f2769d83ad1205720a3029d
treef0596fa83ce4a23e6344628f89fd9a35bfe57766
parentf5d67c10c02b9f5023cb58914cbb1af193846178
tests: Add PSO test case to existing password_lockout tests

This checks that the lockout settings of the PSO take effect when one is
applied to a user. Import the password_settings code to create/apply a
PSO with the same lockout settings that the test cases normally use.
Then update the global settings so that the default lockout settings are
wildly different (i.e. so the test fails if the default lockout settings
get used instead of the PSO's).

As the password-lockout tests are quite slow, I've selected test cases
that should provide sufficient PSO coverage (rather than repeat every
single password-lockout test case in its entirety).

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
selftest/knownfail.d/password_lockout [new file with mode: 0644]
source4/dsdb/tests/python/password_lockout.py
source4/dsdb/tests/python/password_lockout_base.py