From 43838e649c98dfe76743f6e838401e01ae9d4612 Mon Sep 17 00:00:00 2001 From: Griffin Sullivan Date: Thu, 4 Jan 2024 15:48:08 -0500 Subject: [PATCH] Fix and update installer ping test --- tests/foreman/installer/test_installer.py | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/tests/foreman/installer/test_installer.py b/tests/foreman/installer/test_installer.py index e170973bcfa..bcd7f08e9f9 100644 --- a/tests/foreman/installer/test_installer.py +++ b/tests/foreman/installer/test_installer.py @@ -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