From 87447def383ae6742c8b0525d2829f98099039af Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 30 Sep 2022 19:31:04 +0200 Subject: [PATCH] admins/ldapauth: attempt to fix tests, root auth gets broken during slapd restart test --- src/tests/test_ldapauth.py | 2 +- src/utils/ldap.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/test_ldapauth.py b/src/tests/test_ldapauth.py index 5e741fe0f..0ec0346da 100644 --- a/src/tests/test_ldapauth.py +++ b/src/tests/test_ldapauth.py @@ -78,7 +78,7 @@ def test_authenticate_server_down(mocker): def test_authenticate_change_password(): - LDAPAuth().authenticate_credentials(credentials="yunohost") + LDAPAuth().authenticate_credentials(credentials="alice:Yunohost") tools_rootpw("plopette", check_strength=False) diff --git a/src/utils/ldap.py b/src/utils/ldap.py index 28ff8eebe..627ab4e7a 100644 --- a/src/utils/ldap.py +++ b/src/utils/ldap.py @@ -84,7 +84,7 @@ class LDAPInterface: def connect(self): def _reconnect(): con = ldap.ldapobject.ReconnectLDAPObject( - self.uri, retry_max=10, retry_delay=0.5 + self.uri, retry_max=10, retry_delay=2 ) con.sasl_non_interactive_bind_s("EXTERNAL") return con