From 88b9465ad68dbfa1f6904a41cb1d68a9d676df1e 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 | 6 ++++++ 2 files changed, 8 insertions(+), 7 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..cb5b2abfced 100644 --- a/src/tests/multihost/alltests/test_services.py +++ b/src/tests/multihost/alltests/test_services.py @@ -182,6 +182,8 @@ def test_0006_bz1909755(self, multihost, backupsssdconf): 2. Should succeed 3. Should succeed """ + if not multihost.client[0].detect_files_provider(): + pytest.skip("Files Provider support isn't available, skipping") tools = sssdTools(multihost.client[0]) sssd_params = {'domains': 'LOCAL'} tools.sssd_conf('sssd', sssd_params) @@ -213,6 +215,8 @@ def test_0007_bz971435(self, multihost, backupsssdconf): 2. Should succeed 3. Should succeed """ + if not multihost.client[0].detect_files_provider(): + pytest.skip("Files Provider support isn't available, skipping") # port bash to pytest tools = sssdTools(multihost.client[0]) sssd_params = {'debug_level': '9', 'enable_files_domain': 'true'} @@ -246,6 +250,8 @@ def test_0008_bz1516266(self, multihost, backupsssdconf): 4. Successfully reverted the krb5.conf and added string with spaces at the end 5. SSSD failing to start """ + if not multihost.client[0].detect_files_provider(): + pytest.skip("Files Provider support isn't available, skipping") # port bash to pytest tools = sssdTools(multihost.client[0]) sssd_params = {'domains': 'LDAP',