]> 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)
committerJule Anger <janger@samba.org>
Wed, 16 Mar 2022 14:27:11 +0000 (14:27 +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>
(cherry picked from commit a30a7626254c863f95b98c97ea46ff54b98078ad)

python/samba/tests/__init__.py

index 3812f5bad4a48a3eb028f0a37eb94fb5e6d57392..d0cf59e46154499332ff2d2d319976e3caa6dafe 100644 (file)
@@ -172,6 +172,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()
 
@@ -185,6 +187,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):