diff --git a/provider/in_place_upgrade_base.py b/provider/in_place_upgrade_base.py index 241992a83c1..4e28f653673 100644 --- a/provider/in_place_upgrade_base.py +++ b/provider/in_place_upgrade_base.py @@ -76,6 +76,8 @@ def rhsm(self, test): self.session.cmd(subscribe_register, timeout=600) get_poolid = self.params.get("get_pool_id") s, output = self.session.cmd_status_output(get_poolid, timeout=600) + if output == "": + test.cancel("No pool is found, please check the server") attach_pool = self.params.get("attach_pool") + output self.session.cmd(attach_pool, timeout=600) ena_content = self.params.get("enable_content") diff --git a/qemu/tests/in_place_upgrade.py b/qemu/tests/in_place_upgrade.py index d7189330119..9c09f97c939 100644 --- a/qemu/tests/in_place_upgrade.py +++ b/qemu/tests/in_place_upgrade.py @@ -83,12 +83,12 @@ 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"))