]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
tests/krb5: Allow specifying additional details when creating an account
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Mon, 5 Jul 2021 23:25:55 +0000 (11:25 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 18 Aug 2021 22:28:33 +0000 (22:28 +0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
python/samba/tests/krb5/kdc_base_test.py

index f0a9e7311a582201d4a44bfae9c26958f570b5fc..279e15c13ce9df936ac5bfcac1809b271baf2c48 100644 (file)
@@ -148,7 +148,7 @@ class KDCBaseTest(RawKerberosTest):
         return default_enctypes
 
     def create_account(self, ldb, name, machine_account=False,
-                       spn=None, upn=None):
+                       spn=None, upn=None, additional_details=None):
         '''Create an account for testing.
            The dn of the created account is added to self.accounts,
            which is used by tearDownClass to clean up the created accounts.
@@ -180,6 +180,8 @@ class KDCBaseTest(RawKerberosTest):
             details["servicePrincipalName"] = spn
         if upn is not None:
             details["userPrincipalName"] = upn
+        if additional_details is not None:
+            details.update(additional_details)
         ldb.add(details)
 
         creds = KerberosCredentials()