Skip to content

Commit

Permalink
Fix and update installer ping test (#13614)
Browse files Browse the repository at this point in the history
  • Loading branch information
Griffin-Sullivan authored Feb 5, 2024
1 parent 3c5ba75 commit ad192b7
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions tests/foreman/installer/test_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1620,18 +1620,10 @@ def test_positive_check_installer_hammer_ping(target_sat):
"""
# 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
assert result.status == 0
for line in result.stdout.split('\n'):
if 'Status' in line:
assert 'ok' in line


@pytest.mark.e2e
Expand Down

0 comments on commit ad192b7

Please sign in to comment.