mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
tests/krb5: Add account to cleanup list before adding it to database
This ensures accounts are still cleaned up if a test fails before adding it to the cleanup list. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
539cdaa75b
commit
042137f8fa
@ -299,6 +299,8 @@ class KDCBaseTest(RawKerberosTest):
|
||||
details["userPrincipalName"] = upn
|
||||
if additional_details is not None:
|
||||
details.update(additional_details)
|
||||
# Save the account name so it can be deleted in tearDownClass
|
||||
self.accounts.append(dn)
|
||||
samdb.add(details)
|
||||
|
||||
creds = KerberosCredentials()
|
||||
@ -314,9 +316,6 @@ class KDCBaseTest(RawKerberosTest):
|
||||
creds.set_dn(ldb.Dn(samdb, dn))
|
||||
creds.set_upn(upn)
|
||||
creds.set_spn(spn)
|
||||
#
|
||||
# Save the account name so it can be deleted in tearDownClass
|
||||
self.accounts.append(dn)
|
||||
|
||||
self.creds_set_enctypes(creds)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user