tests: Fix intermittent error in PSO test
authorTim Beale <timbeale@catalyst.net.nz>
Mon, 28 May 2018 22:46:50 +0000 (10:46 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 30 May 2018 02:23:27 +0000 (04:23 +0200)
commit642dd37d51d8fb69b04ec444a590550b1807a0d8
tree5420c580ac7b96b87f13f9255be5c3fc6d0ea497
parent5ea111471aff23c66ab9a62b4e3a4db25b7f5738
tests: Fix intermittent error in PSO test

Deleting a group fails if the primaryGroupID of a user is set to that of
the group. This can happen in the PSO tests, as we don't clear the
primaryGroupID before cleaning up. Normally it seems to work OK, but
this is relying purely on the subtree delete order.

Update the test to clear the primaryGroupID before the tearDown is
called, to make things more robust.

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

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
source4/dsdb/tests/python/password_settings.py