From 1ff317f7f4f08b23886b868844a0f88ed546b55c Mon Sep 17 00:00:00 2001 From: rmynar <64528205+rmynar@users.noreply.github.com> Date: Mon, 20 Jan 2025 17:11:32 +0100 Subject: [PATCH] Prevent satellite-installer false negative (#17384) fix false negative (cherry picked from commit c251f4678dc06401046a66aa5d8c16b7d3fe55e9) --- tests/foreman/installer/test_installer.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/foreman/installer/test_installer.py b/tests/foreman/installer/test_installer.py index 9fea61f2f36..4544b4a1e60 100644 --- a/tests/foreman/installer/test_installer.py +++ b/tests/foreman/installer/test_installer.py @@ -1367,8 +1367,8 @@ def install_satellite(satellite, installer_args): satellite.execute( 'firewall-cmd --permanent --add-service RH-Satellite-6 && firewall-cmd --reload' ) - # Install Satellite - satellite.execute( + # Install Satellite and return result + return satellite.execute( InstallerCommand(installer_args=installer_args).get_command(), timeout='30m', ) @@ -1382,7 +1382,9 @@ def sat_default_install(module_sat_ready_rhels): f'foreman-initial-admin-password {settings.server.admin_password}', ] sat = module_sat_ready_rhels.pop() - install_satellite(sat, installer_args) + assert install_satellite(sat, installer_args).status == 0, ( + "Satellite installation failed (non-zero return code)" + ) return sat @@ -1396,7 +1398,9 @@ def sat_non_default_install(module_sat_ready_rhels): 'foreman-proxy-content-pulpcore-hide-guarded-distributions false', ] sat = module_sat_ready_rhels.pop() - install_satellite(sat, installer_args) + assert install_satellite(sat, installer_args).status == 0, ( + "Satellite installation failed (non-zero return code)" + ) return sat