URL: https://github.com/SSSD/sssd/pull/5796 Author: aborah-sudo Title: #5796: Tests: sss_cache prints spurious error messages Action: synchronized
To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/5796/head:pr5796 git checkout pr5796
From 9cbed87de0af54ce75cb3e6379c4a27e81694a4d Mon Sep 17 00:00:00 2001 From: Anuj Borah <abo...@redhat.com> Date: Sun, 26 Sep 2021 19:08:38 +0530 Subject: [PATCH] Tests: sss_cache prints spurious error messages verifies: https://github.com/SSSD/sssd/issues/4904 bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1661182 --- .../multihost/alltests/test_sssctl_local.py | 51 ++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/src/tests/multihost/alltests/test_sssctl_local.py b/src/tests/multihost/alltests/test_sssctl_local.py index a6ad42814f..622597ce82 100644 --- a/src/tests/multihost/alltests/test_sssctl_local.py +++ b/src/tests/multihost/alltests/test_sssctl_local.py @@ -9,6 +9,7 @@ import pytest from sssd.testlib.common.utils import sssdTools from sssd.testlib.common.paths import SSSD_DEFAULT_CONF +from sssd.testlib.common.exceptions import SSSDException def client_version(multihost): @@ -23,7 +24,9 @@ class Testsssctl(object): This is test case class for sssctl suite """ @pytest.mark.tier1_2 - def test_0001_bz1640576(self, multihost, localusers): + def test_0001_bz1640576(self, multihost, + backupsssdconf, + localusers): """ :title: IDM-SSSD-TC: sssctl: sssctl reports incorrect information about local user's cache entry expiration time @@ -80,3 +83,49 @@ def test_0002_bz1599207(self, multihost, raiseonerr=False) assert 'Cache entry creation date' in \ cmd.stdout_text and cmd.returncode == 0 + + @pytest.mark.tier1_2 + def test_0003_bz1661182(self, multihost, + backupsssdconf): + """ + :title: sss_cache prints spurious error messages + when invoked from shadow-utils on package install + :id: 8f2868d2-1ece-11ec-ac6d-845cf3eff344 + :bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1661182 + :steps: + 1. Configure sssd without any domain + 2. Restart sssd (sssd should not be + running after this) + 3. Modify existing local user usermod -a -G wheel user1 + 4. This message + [sss_cache] [confdb_get_domains] (0x0010): + No domains configured, fatal error! + must not appear in console + :expectedresults: + 1. Should succeed + 2. Should succeed + 3. Should succeed + 4. Should succeed + """ + tools = sssdTools(multihost.client[0]) + ldap_params = {'enable_files_domain': 'false'} + tools.sssd_conf('sssd', ldap_params) + with pytest.raises(SSSDException): + multihost.client[0].service_sssd('restart') + ps_cmd = "> /var/log/sssd/sssd.log" + multihost.client[0].run_command(ps_cmd) + ps_cmd = "useradd user1_test" + multihost.client[0].run_command(ps_cmd) + ps_cmd = "usermod -a -G wheel user1_test" + cmd = multihost.client[0].run_command(ps_cmd) + assert 'No domains configured, fatal error!' \ + not in cmd.stdout_text + ps_cmd = "userdel user1_test" + multihost.client[0].run_command(ps_cmd) + for ps_cmd in ('sss_cache -U', + 'sss_cache -G', + 'sss_cache -E', + 'sss_cache -u non-existinguser'): + cmd = multihost.client[0].run_command(ps_cmd) + assert 'No domains configured, fatal error!' \ + not in cmd.stdout_text
_______________________________________________ sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/sssd-devel@lists.fedorahosted.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure