]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
python:tests: let insta_creds() also copy the bind_dn from the template
authorStefan Metzmacher <metze@samba.org>
Fri, 4 Mar 2022 20:50:15 +0000 (21:50 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 10 Mar 2022 03:16:35 +0000 (03:16 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13879

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/__init__.py

index 6d4993ac255ed6efa79c958597620a61bb5eb1d3..3bb7995052cdbde28ded8dfb813af053087937ec 100644 (file)
@@ -171,6 +171,8 @@ class TestCase(unittest.TestCase):
             username = template.get_username()
             userpass = template.get_password()
 
+        simple_bind_dn = template.get_bind_dn()
+
         if kerberos_state is None:
             kerberos_state = template.get_kerberos_state()
 
@@ -184,6 +186,8 @@ class TestCase(unittest.TestCase):
         c.set_gensec_features(c.get_gensec_features()
                               | gensec.FEATURE_SEAL)
         c.set_kerberos_state(kerberos_state)
+        if simple_bind_dn:
+            c.set_bind_dn(simple_bind_dn)
         return c
 
     def assertStringsEqual(self, a, b, msg=None, strip=False):