From c9cfbc5850767da83c1a029872ce3a149a36ad3c Mon Sep 17 00:00:00 2001 From: aborah Date: Mon, 13 May 2024 11:09:39 +0530 Subject: [PATCH] Tests: Fix the test failures for tier-1-pytest-alltests-tier1-2 for non root configuration Fix the test failures for tier-1-pytest-alltests-tier1-2 for non root configuration --- src/tests/multihost/alltests/test_misc.py | 9 ++------- src/tests/multihost/alltests/test_services.py | 10 ++-------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/src/tests/multihost/alltests/test_misc.py b/src/tests/multihost/alltests/test_misc.py index 2c62947ed18..b80f5ec6286 100644 --- a/src/tests/multihost/alltests/test_misc.py +++ b/src/tests/multihost/alltests/test_misc.py @@ -438,16 +438,11 @@ def test_0008_1636002(multihost, backupsssdconf): # Try ssh after socket activation is configured # Result does not matter we just need to trigger the PAM stack with pytest.raises(Exception): - check_login_client(multihost, user, 'Secret123') - - # Print pam log for debug purposes - multihost.client[0].run_command( - 'cat /var/log/sssd/sssd_pam.log', raiseonerr=False) + check_login_client(multihost, user, 'Secret1234') # Download sssd pam log log_str = multihost.client[0].get_file_contents( - "/var/log/sssd/sssd_pam.log"). \ - decode('utf-8') + f"/var/log/sssd/sssd_{domain_name}.log").decode('utf-8') # Disable socket activation multihost.client[0].run_command( diff --git a/src/tests/multihost/alltests/test_services.py b/src/tests/multihost/alltests/test_services.py index 0229f7740db..a4a26e82c7c 100644 --- a/src/tests/multihost/alltests/test_services.py +++ b/src/tests/multihost/alltests/test_services.py @@ -20,7 +20,7 @@ def exceute_cmd(multihost, command): return cmd -@pytest.mark.usefixtures('default_sssd') +@pytest.mark.usefixtures('setup_sssd') @pytest.mark.services class TestServices(object): """ SSSD sanity services """ @@ -182,12 +182,6 @@ def test_0006_bz1909755(self, multihost, backupsssdconf): 2. Should succeed 3. Should succeed """ - tools = sssdTools(multihost.client[0]) - sssd_params = {'domains': 'LOCAL'} - tools.sssd_conf('sssd', sssd_params) - domain_section = 'domain/LOCAL' - domain_params = {'id_provider': 'files'} - tools.sssd_conf(domain_section, domain_params) multihost.client[0].service_sssd('restart') proces_id = int(exceute_cmd(multihost, "pidof sssd").stdout_text.split()[0]) @@ -215,7 +209,7 @@ def test_0007_bz971435(self, multihost, backupsssdconf): """ # port bash to pytest tools = sssdTools(multihost.client[0]) - sssd_params = {'debug_level': '9', 'enable_files_domain': 'true'} + sssd_params = {'debug_level': '9'} tools.sssd_conf('sssd', sssd_params) multihost.client[0].run_command('echo "PIZZA=YUMMY" > /etc/sysconfig/sssd', raiseonerr=False) multihost.client[0].service_sssd('restart')