Skip to content

Commit

Permalink
Fix and update installer ping test
Browse files Browse the repository at this point in the history
  • Loading branch information
Griffin-Sullivan committed Jan 4, 2024
1 parent 3e5de78 commit 43838e6
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions tests/foreman/installer/test_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1627,19 +1627,10 @@ def test_positive_check_installer_hammer_ping(target_sat):
:CaseLevel: System
"""
# check status reported by hammer ping command
result = target_sat.execute('hammer ping')
test_result = {}
service = None
for line in result.stdout.strip().replace(' ', '').split('\n'):
if line.split(':')[0] not in ('Status', 'ServerResponse', 'message'):
service = line.split(':')[0]
test_result[service] = {}
else:
key, value = line.split(":", 1)
test_result[service][key] = value

not_ok = {svc: result for svc, result in test_result.items() if result['Status'] != 'ok'}
assert not not_ok
result = target_sat.cli.Base.ping()
for line in result.split('\n'):
if 'Status' in line:
assert 'ok' in line


@pytest.mark.e2e
Expand Down

0 comments on commit 43838e6

Please sign in to comment.