Skip to content

Commit

Permalink
Tests: Fix the test failures for tier-1-pytest-alltests-tier1-2 for n…
Browse files Browse the repository at this point in the history
…on root configuration

Fix the test failures for tier-1-pytest-alltests-tier1-2 for non root configuration
  • Loading branch information
aborah-sudo committed May 13, 2024
1 parent 31bd16f commit 88b9465
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/tests/multihost/alltests/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
6 changes: 6 additions & 0 deletions src/tests/multihost/alltests/test_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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'}
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit 88b9465

Please sign in to comment.