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>
admin_pso.apply_to(admin_users)
self.assert_PSO_applied(user, admin_pso)
+ # restore the default primaryGroupID so we can safely delete the group
+ user.set_primary_group(domain_users)
+
def test_pso_none_applied(self):
"""Tests cases where no Resultant PSO should be returned"""