diff --git a/provider/in_place_upgrade_base.py b/provider/in_place_upgrade_base.py index 241992a83c..2b4978d541 100644 --- a/provider/in_place_upgrade_base.py +++ b/provider/in_place_upgrade_base.py @@ -77,6 +77,8 @@ def rhsm(self, test): get_poolid = self.params.get("get_pool_id") s, output = self.session.cmd_status_output(get_poolid, timeout=600) attach_pool = self.params.get("attach_pool") + output + if output == "": + test.cancel("No pool is found, please check the server") self.session.cmd(attach_pool, timeout=600) ena_content = self.params.get("enable_content") self.session.cmd(ena_content, timeout=3000) diff --git a/qemu/tests/in_place_upgrade.py b/qemu/tests/in_place_upgrade.py index d718933011..40530079f2 100644 --- a/qemu/tests/in_place_upgrade.py +++ b/qemu/tests/in_place_upgrade.py @@ -83,12 +83,11 @@ def run(test, params, env): # process upgrade upgrade_test.upgrade_process(params.get("process_upgrade_no_rhsm")) elif params.get("rhsm_type") == "rhsm": - upgrade_test.rhsm(test) if params.get("com_install") == "yes": upgrade_test.run_guest_cmd(params.get("ins_leapp_cmd")) upgrade_test.run_guest_cmd(params.get("prepare_env")) upgrade_test.run_guest_cmd(params.get("get_answer_files_source")) - upgrade_test.run_guest_cmd(params.get("get_answer_files")) + upgrade_test.rhsm(test) upgrade_test.session = vm.reboot(upgrade_test.session) upgrade_test.pre_upgrade_whitelist(test) upgrade_test.run_guest_cmd(params.get("pre_upgrade_rhsm"))