URL:
https://github.com/SSSD/sssd/pull/5381
Title: #5381: pytest multihost tests for sssd
pbrezina commented:
"""
Thanks for the updates Steeve. There is an issue with one of the sudo tests, see:
https://s3.eu-central-1.amazonaws.com/sssd-ci/PR-5381/6/rhel8/multihost-p...
```
==================================== ERRORS ====================================
__________ ERROR at setup of TestSanitySudo.test_refresh_expired_rule __________
session_multihost = <pytest_multihost.plugin.MultihostFixture object at
0x7f31cb997128>
request = <SubRequest 'generic_sudorule' for <Function
'test_refresh_expired_rule'>>
@pytest.fixture
def generic_sudorule(session_multihost, request):
""" Create a generic sudo rule """
ldap_uri = 'ldap://%s' % (session_multihost.master[0].sys_hostname)
ds_rootdn = 'cn=Directory Manager'
ds_rootpw = 'Secret123'
ldap_inst = LdapOperations(ldap_uri, ds_rootdn, ds_rootpw)
ldap_inst.org_unit('sudoers',
'dc=example,dc=test')
src/tests/multihost/basic/conftest.py:257:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
src/tests/multihost/sssd/testlib/common/utils.py:991: in org_unit
(ret, _) = self.add_entry(attr, org_dn)
src/tests/multihost/sssd/testlib/common/utils.py:839: in add_entry
self.conn.add_s(ldap_dn, ldif)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:439: in add_s
return self.add_ext_s(dn,modlist,None,None)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:425: in add_ext_s
resp_type, resp_data, resp_msgid, resp_ctrls =
self.result3(msgid,all=1,timeout=self.timeout)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:767: in result3
resp_ctrl_classes=resp_ctrl_classes
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:774: in result4
ldap_result =
self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:340: in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
/usr/lib64/python3.6/site-packages/ldap/compat.py:46: in reraise
raise exc_value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <ldap.ldapobject.SimpleLDAPObject object at 0x7f31c8075940>
func = <built-in method result4 of LDAP object at 0x7f31c80d7b70>
args = (2, 1, -1, 0, 0, 0), kwargs = {}, diagnostic_message_success = None
exc_type = None, exc_value = None, exc_traceback = None
def _ldap_call(self,func,*args,**kwargs):
"""
Wrapper method mainly for serializing calls into OpenLDAP libs
and trace logs
"""
self._ldap_object_lock.acquire()
if __debug__:
if self._trace_level>=1:
self._trace_file.write('*** %s %s - %s\n%s\n' % (
repr(self),
self._uri,
'.'.join((self.__class__.__name__,func.__name__)),
pprint.pformat((args,kwargs))
))
if self._trace_level>=9:
traceback.print_stack(limit=self._trace_stack_limit,file=self._trace_file)
diagnostic_message_success = None
try:
try:
result = func(*args,**kwargs)
E ldap.ALREADY_EXISTS: {'msgtype': 105, 'msgid': 2,
'result': 68, 'desc': 'Already exists', 'ctrls': []}
/usr/lib64/python3.6/site-packages/ldap/ldapobject.py:324: ALREADY_EXISTS
===================== 27 passed, 1 error in 780.65 seconds =====================
This seems to be related to your PR since it passes on other PRs.
```
"""
See the full comment at
https://github.com/SSSD/sssd/pull/5381#issuecomment-724627101