URL: https://github.com/SSSD/sssd/pull/5381 Author: sgoveas Title: #5381: pytest multihost tests for sssd Action: opened
PR body: """ PR includes all available pytest multihost tests written for sssd. configtest.py has been moved to basic as 'ad' and 'alltests' have their respective conftest.py files. PR CI change may be needed for the basic tests running in sssd-test-suite. """
To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/5381/head:pr5381 git checkout pr5381
URL: https://github.com/SSSD/sssd/pull/5381 Author: sgoveas Title: #5381: pytest multihost tests for sssd Action: synchronized
To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/5381/head:pr5381 git checkout pr5381
URL: https://github.com/SSSD/sssd/pull/5381 Title: #5381: pytest multihost tests for sssd
pbrezina commented: """ The conftest.py in .../multihost directory is important - it makes sure that .../multihost is added to python import path so we can import sssd.testlib. But it can be also empty for now and use it for global definitions if needed.
* create src/tests/multihost/conftest.py - it can be empty * include this change to execute only basic tests for now so ci is not broken ````diff diff --git a/contrib/ci/run-multihost b/contrib/ci/run-multihost index 8eaf119c9..a7b69a169 100755 --- a/contrib/ci/run-multihost +++ b/contrib/ci/run-multihost @@ -52,4 +52,4 @@ echo "Installing python requirements" sudo pip3 install -r $DIR/requirements.txt &> multihost-pip.log
echo "Running tests" -pytest-3 -s --multihost-config=$DIR/basic/mhc.yaml $DIR &> multihost-pytest.log +pytest-3 -s --multihost-config=$DIR/basic/mhc.yaml $DIR/basic &> multihost-pytest.log diff --git a/src/tests/multihost/README.md b/src/tests/multihost/README.md index 6e5919abc..3f4a8fa91 100644 --- a/src/tests/multihost/README.md +++ b/src/tests/multihost/README.md @@ -45,5 +45,5 @@ Note: You can skip this step if you use machines from sssd-test-suite. ## Run the tests
``` -pytest-3 -s --multihost-config=src/tests/multihost/basic/mhc.yaml src/tests/multihost +pytest-3 -s --multihost-config=src/tests/multihost/basic/mhc.yaml src/tests/multihost/basic ``` ````
I will then enable those test in PR CI. """
See the full comment at https://github.com/SSSD/sssd/pull/5381#issuecomment-721711151
URL: https://github.com/SSSD/sssd/pull/5381 Title: #5381: pytest multihost tests for sssd
Label: +Changes requested
URL: https://github.com/SSSD/sssd/pull/5381 Author: sgoveas Title: #5381: pytest multihost tests for sssd Action: synchronized
To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/5381/head:pr5381 git checkout pr5381
URL: https://github.com/SSSD/sssd/pull/5381 Title: #5381: pytest multihost tests for sssd
pbrezina commented: """ Thank you. There are also pep8 issues, please fix them: https://s3.eu-central-1.amazonaws.com/sssd-ci/PR-5381/4/fedora33/ci-pep8.log """
See the full comment at https://github.com/SSSD/sssd/pull/5381#issuecomment-722294045
URL: https://github.com/SSSD/sssd/pull/5381 Author: sgoveas Title: #5381: pytest multihost tests for sssd Action: synchronized
To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/5381/head:pr5381 git checkout pr5381
URL: https://github.com/SSSD/sssd/pull/5381 Title: #5381: pytest multihost tests for sssd
ikerexxe commented: """ There are white space issues. For all the instances that are failing take a look at: https://s3.eu-central-1.amazonaws.com/sssd-ci/PR-5381/5/fedora33/test-suite.... """
See the full comment at https://github.com/SSSD/sssd/pull/5381#issuecomment-723918772
URL: https://github.com/SSSD/sssd/pull/5381 Author: sgoveas Title: #5381: pytest multihost tests for sssd Action: synchronized
To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/5381/head:pr5381 git checkout pr5381
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-pyte...
``` ==================================== 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
URL: https://github.com/SSSD/sssd/pull/5381 Author: sgoveas Title: #5381: pytest multihost tests for sssd Action: synchronized
To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/5381/head:pr5381 git checkout pr5381
URL: https://github.com/SSSD/sssd/pull/5381 Title: #5381: pytest multihost tests for sssd
pbrezina commented: """ The failure are not related. Ack. """
See the full comment at https://github.com/SSSD/sssd/pull/5381#issuecomment-725993686
URL: https://github.com/SSSD/sssd/pull/5381 Title: #5381: pytest multihost tests for sssd
Label: -Changes requested
URL: https://github.com/SSSD/sssd/pull/5381 Title: #5381: pytest multihost tests for sssd
Label: +Ready to push
URL: https://github.com/SSSD/sssd/pull/5381 Title: #5381: pytest multihost tests for sssd
Label: +Accepted
URL: https://github.com/SSSD/sssd/pull/5381 Title: #5381: pytest multihost tests for sssd
pbrezina commented: """ Pushed PR: https://github.com/SSSD/sssd/pull/5381
* `master` * f404cd3e3b7dc8c1084ff47f8e7cc7569942ecf9 - Remove trailing whitespaces * 94a9833b0e45e0da2c07f3ab3422c5018869320a - Fix errors found during testing * d2d44e9a3c5d4d2b0312e688f521bdba04560b73 - Include data directory * fe56d5c9ec020003df0bec4cc0cf143b08c01279 - Fix pep8 issues * 4205accc2f2e5c3ac3a520ea66907be7834361b9 - Add empty conftest.py and update path to run basic tests * 6cc11a9a85e6f6b38eabceecc9611aca85237328 - Update sssd testlibs * 3c06709b9d4bcb456f84e919552fe4e58b3f70ad - Add ipa test code * 73f5699bc104d9d097f79feeaecae8b458961fd5 - Add ad test code * ef4c82bb9bdad00240dca4b9d4d7eb9a95b38e7b - Add alltests code * 804ae76d6beac5fae5265d23093bc3b91c04b5c5 - Move conftest.py to basic dir
"""
See the full comment at https://github.com/SSSD/sssd/pull/5381#issuecomment-726680269
URL: https://github.com/SSSD/sssd/pull/5381 Title: #5381: pytest multihost tests for sssd
Label: +Pushed
URL: https://github.com/SSSD/sssd/pull/5381 Title: #5381: pytest multihost tests for sssd
Label: -Accepted
URL: https://github.com/SSSD/sssd/pull/5381 Title: #5381: pytest multihost tests for sssd
Label: -Ready to push
URL: https://github.com/SSSD/sssd/pull/5381 Author: sgoveas Title: #5381: pytest multihost tests for sssd Action: closed
To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/5381/head:pr5381 git checkout pr5381
sssd-devel@lists.fedorahosted.org