diff --git a/convert2rhel/breadcrumbs.py b/convert2rhel/breadcrumbs.py index 462752d5ad..fd7c3b5865 100644 --- a/convert2rhel/breadcrumbs.py +++ b/convert2rhel/breadcrumbs.py @@ -235,7 +235,6 @@ def print_data_collection(self): "- Convert2RHEL related environment variables\n\n", RHSM_CUSTOM_FACTS_FILE, ) - utils.ask_to_continue() diff --git a/convert2rhel/main.py b/convert2rhel/main.py index 39f855b2cc..45e4344371 100644 --- a/convert2rhel/main.py +++ b/convert2rhel/main.py @@ -314,6 +314,17 @@ def _handle_inhibitors_found_exception(): return ConversionExitCodes.INHIBITORS_FOUND +def confirm_user_backup(): + loggerinst.warning( + "Convert2RHEL modifies the systems during the analysis and then rolls back these " + "changes when the analysis is complete. In rare cases, this rollback can fail. " + "By continuing, you confirm that you have made a system backup and verified that " + "you can restore from the backup." + ) + + utils.ask_to_continue() + + # # Boilerplate Tasks # @@ -327,6 +338,7 @@ def perform_boilerplate(): loggerinst.task("Prepare: Inform about data collection") breadcrumbs.breadcrumbs.print_data_collection() + confirm_user_backup() def show_eula(): diff --git a/convert2rhel/unit_tests/breadcrumbs_test.py b/convert2rhel/unit_tests/breadcrumbs_test.py index 3d822b20bb..653574e88f 100644 --- a/convert2rhel/unit_tests/breadcrumbs_test.py +++ b/convert2rhel/unit_tests/breadcrumbs_test.py @@ -22,6 +22,7 @@ import pytest import six + from convert2rhel import breadcrumbs, pkghandler, pkgmanager from convert2rhel.unit_tests import create_pkg_information, create_pkg_obj from convert2rhel.unit_tests.conftest import centos7 diff --git a/convert2rhel/unit_tests/main_test.py b/convert2rhel/unit_tests/main_test.py index 610781675d..94ab68b59e 100644 --- a/convert2rhel/unit_tests/main_test.py +++ b/convert2rhel/unit_tests/main_test.py @@ -285,7 +285,7 @@ def test_main(monkeypatch, global_tool_opts, tmp_path): assert raise_for_skipped_failures_mock.call_count == 2 assert report_summary_mock.call_count == 2 assert clear_versionlock_mock.call_count == 1 - assert ask_to_continue_mock.call_count == 1 + assert ask_to_continue_mock.call_count == 2 assert restart_system_mock.call_count == 1 assert summary_as_json_mock.call_count == 1 assert summary_as_txt_mock.call_count == 1 @@ -315,6 +315,8 @@ def test_main_rollback_post_cli_phase(self, monkeypatch, caplog, tmp_path): assert "No changes were made to the system." in caplog.records[-2].message def test_main_traceback_in_clear_versionlock(self, caplog, monkeypatch, tmp_path): + ask_to_continue_mock = mock.Mock(return_value=True) + monkeypatch.setattr(applock, "_DEFAULT_LOCK_DIR", str(tmp_path)) monkeypatch.setattr(utils, "require_root", RequireRootMocked()) monkeypatch.setattr(main, "initialize_file_logging", InitializeFileLoggingMocked()) @@ -334,6 +336,8 @@ def test_main_traceback_in_clear_versionlock(self, caplog, monkeypatch, tmp_path ), ) + monkeypatch.setattr(utils, "ask_to_continue", ask_to_continue_mock) + # Mock rollback items monkeypatch.setattr(main, "rollback_changes", RollbackChangesMocked()) monkeypatch.setattr(main, "provide_status_after_rollback", PrintInfoAfterRollbackMocked()) @@ -349,6 +353,7 @@ def test_main_traceback_in_clear_versionlock(self, caplog, monkeypatch, tmp_path assert system_info.resolve_system_info.call_count == 1 assert breadcrumbs.collect_early_data.call_count == 1 assert pkghandler.clear_versionlock.call_count == 1 + assert ask_to_continue_mock.call_count == 1 assert main.rollback_changes.call_count == 0 assert main.provide_status_after_rollback.call_count == 0 @@ -372,6 +377,7 @@ def test_main_traceback_before_action_completion(self, monkeypatch, caplog, tmp_ clean_yum_metadata_mock = mock.Mock() run_pre_actions_mock = mock.Mock(side_effect=Exception("Action Framework Crashed")) clear_versionlock_mock = mock.Mock() + ask_to_continue_mock = mock.Mock(return_value=True) summary_as_txt_mock = mock.Mock() # Mock the rollback calls @@ -391,6 +397,7 @@ def test_main_traceback_before_action_completion(self, monkeypatch, caplog, tmp_ monkeypatch.setattr(system_info, "print_system_information", print_system_information_mock) monkeypatch.setattr(breadcrumbs, "collect_early_data", collect_early_data_mock) monkeypatch.setattr(pkghandler, "clear_versionlock", clear_versionlock_mock) + monkeypatch.setattr(utils, "ask_to_continue", ask_to_continue_mock) monkeypatch.setattr(pkgmanager, "clean_yum_metadata", clean_yum_metadata_mock) monkeypatch.setattr(actions, "run_pre_actions", run_pre_actions_mock) monkeypatch.setattr(breadcrumbs, "finish_collection", finish_collection_mock) @@ -411,6 +418,7 @@ def test_main_traceback_before_action_completion(self, monkeypatch, caplog, tmp_ assert clean_yum_metadata_mock.call_count == 1 assert run_pre_actions_mock.call_count == 1 assert clear_versionlock_mock.call_count == 1 + assert ask_to_continue_mock.call_count == 1 assert finish_collection_mock.call_count == 1 assert should_subscribe_mock.call_count == 1 assert update_rhsm_custom_facts_mock.call_count == 1 @@ -436,6 +444,7 @@ def test_main_rollback_pre_ponr_changes_phase(self, monkeypatch, tmp_path, globa run_pre_actions_mock = mock.Mock() report_summary_mock = mock.Mock() clear_versionlock_mock = mock.Mock() + ask_to_continue_mock = mock.Mock(return_value=True) find_actions_of_severity_mock = mock.Mock() summary_as_txt_mock = mock.Mock() @@ -456,6 +465,7 @@ def test_main_rollback_pre_ponr_changes_phase(self, monkeypatch, tmp_path, globa monkeypatch.setattr(system_info, "print_system_information", print_system_information_mock) monkeypatch.setattr(breadcrumbs, "collect_early_data", collect_early_data_mock) monkeypatch.setattr(pkghandler, "clear_versionlock", clear_versionlock_mock) + monkeypatch.setattr(utils, "ask_to_continue", ask_to_continue_mock) monkeypatch.setattr(pkgmanager, "clean_yum_metadata", clean_yum_metadata_mock) monkeypatch.setattr(actions, "run_pre_actions", run_pre_actions_mock) monkeypatch.setattr(report, "_summary", report_summary_mock) @@ -480,6 +490,7 @@ def test_main_rollback_pre_ponr_changes_phase(self, monkeypatch, tmp_path, globa assert report_summary_mock.call_count == 1 assert find_actions_of_severity_mock.call_count == 1 assert clear_versionlock_mock.call_count == 1 + assert ask_to_continue_mock.call_count == 1 assert finish_collection_mock.call_count == 1 assert should_subscribe_mock.call_count == 1 assert update_rhsm_custom_facts_mock.call_count == 1 @@ -507,6 +518,7 @@ def test_main_rollback_analyze_exit_phase_without_subman(self, global_tool_opts, (system_info, "print_system_information", mock.Mock()), (breadcrumbs, "collect_early_data", mock.Mock()), (pkghandler, "clear_versionlock", mock.Mock()), + (utils, "ask_to_continue", mock.Mock(return_value=True)), (pkgmanager, "clean_yum_metadata", mock.Mock()), (actions, "run_pre_actions", mock.Mock()), (report, "_summary", mock.Mock()), @@ -530,6 +542,7 @@ def test_main_rollback_analyze_exit_phase_without_subman(self, global_tool_opts, assert system_info.print_system_information.call_count == 1 assert breadcrumbs.collect_early_data.call_count == 1 assert pkghandler.clear_versionlock.call_count == 1 + assert utils.ask_to_continue.call_count == 1 assert pkgmanager.clean_yum_metadata.call_count == 1 assert actions.run_pre_actions.call_count == 1 assert report._summary.call_count == 1 @@ -553,6 +566,7 @@ def test_main_rollback_analyze_exit_phase(self, global_tool_opts, monkeypatch, t run_pre_actions_mock = mock.Mock() report_summary_mock = mock.Mock() clear_versionlock_mock = mock.Mock() + ask_to_continue_mock = mock.Mock(return_value=True) summary_as_json_mock = mock.Mock() summary_as_txt_mock = mock.Mock() @@ -572,6 +586,7 @@ def test_main_rollback_analyze_exit_phase(self, global_tool_opts, monkeypatch, t monkeypatch.setattr(system_info, "print_system_information", print_system_information_mock) monkeypatch.setattr(breadcrumbs, "collect_early_data", collect_early_data_mock) monkeypatch.setattr(pkghandler, "clear_versionlock", clear_versionlock_mock) + monkeypatch.setattr(utils, "ask_to_continue", ask_to_continue_mock) monkeypatch.setattr(pkgmanager, "clean_yum_metadata", clean_yum_metadata_mock) monkeypatch.setattr(actions, "run_pre_actions", run_pre_actions_mock) monkeypatch.setattr(report, "_summary", report_summary_mock) @@ -595,6 +610,7 @@ def test_main_rollback_analyze_exit_phase(self, global_tool_opts, monkeypatch, t assert run_pre_actions_mock.call_count == 1 assert report_summary_mock.call_count == 1 assert clear_versionlock_mock.call_count == 1 + assert ask_to_continue_mock.call_count == 1 assert finish_collection_mock.call_count == 1 assert should_subscribe_mock.call_count == 1 assert update_rhsm_custom_facts_mock.call_count == 1 @@ -661,7 +677,7 @@ def test_main_rollback_post_ponr_changes_phase(self, monkeypatch, caplog, tmp_pa assert find_actions_of_severity_mock.call_count == 1 assert clear_versionlock_mock.call_count == 1 assert report_summary_mock.call_count == 2 - assert ask_to_continue_mock.call_count == 1 + assert ask_to_continue_mock.call_count == 2 assert finish_collection_mock.call_count == 1 assert summary_as_json_mock.call_count == 1 assert summary_as_txt_mock.call_count == 1 @@ -768,3 +784,22 @@ def test_handle_inhibitors_found_exception(monkeypatch, rollback_failures, retur ret = main._handle_inhibitors_found_exception() assert ret == return_code + + +def test_confirm_user_backup(monkeypatch, caplog): + ask_to_continue_mock = mock.Mock(return_value=True) + + # Mock the ask_to_continue function + monkeypatch.setattr(utils, "ask_to_continue", ask_to_continue_mock) + + main.confirm_user_backup() + + message = ( + "Convert2RHEL modifies the systems during the analysis and then rolls back these " + "changes when the analysis is complete. In rare cases, this rollback can fail. " + "By continuing, you confirm that you have made a system backup and verified that " + "you can restore from the backup." + ) + + assert message in caplog.records[-1].message + assert ask_to_continue_mock.call_count == 1 diff --git a/tests/integration/tier0/non-destructive/assessment-report/test_assessment_report.py b/tests/integration/tier0/non-destructive/assessment-report/test_assessment_report.py index 3ee220a021..3396ea0503 100644 --- a/tests/integration/tier0/non-destructive/assessment-report/test_assessment_report.py +++ b/tests/integration/tier0/non-destructive/assessment-report/test_assessment_report.py @@ -56,6 +56,9 @@ def test_failures_and_skips_in_report(convert2rhel): c2r.expect("Continue with the system conversion?") c2r.sendline("y") + c2r.expect("Continue with the system conversion?") + c2r.sendline("y") + # Assert that we start rollback first c2r.expect_exact("TASK - [Rollback:") @@ -105,6 +108,9 @@ def test_successful_report(convert2rhel): c2r.expect("Continue with the system conversion?") c2r.sendline("y") + c2r.expect("Continue with the system conversion?") + c2r.sendline("y") + # Assert that we start rollback first c2r.expect("Rollback: RHSM-related actions") @@ -147,6 +153,9 @@ def test_convert_method_successful_report(convert2rhel): c2r.expect("Continue with the system conversion?") c2r.sendline("y") + c2r.expect("Continue with the system conversion?") + c2r.sendline("y") + # Refuse the full conversion at PONR c2r.expect("Continue with the system conversion?") c2r.sendline("n") diff --git a/tests/integration/tier0/non-destructive/basic-sanity-checks/test_basic_sanity_checks.py b/tests/integration/tier0/non-destructive/basic-sanity-checks/test_basic_sanity_checks.py index fc015f34cb..aa3c051876 100644 --- a/tests/integration/tier0/non-destructive/basic-sanity-checks/test_basic_sanity_checks.py +++ b/tests/integration/tier0/non-destructive/basic-sanity-checks/test_basic_sanity_checks.py @@ -105,6 +105,9 @@ def test_c2r_version_latest_with_mocked_newer_version(convert2rhel, c2r_version, c2r.expect("Continue with the system conversion?") c2r.sendline("y") + c2r.expect("Continue with the system conversion?") + c2r.sendline("y") + assert c2r.expect("Latest available convert2rhel version is installed.", timeout=300) == 0 c2r.sendcontrol("c") @@ -125,6 +128,9 @@ def test_c2r_version_latest_inhibitor(convert2rhel, c2r_version, version): c2r.expect("Continue with the system conversion?") c2r.sendline("y") + c2r.expect("Continue with the system conversion?") + c2r.sendline("y") + assert ( c2r.expect_exact( "(OVERRIDABLE) CONVERT2RHEL_LATEST_VERSION::OUT_OF_DATE - Outdated convert2rhel version detected", @@ -153,6 +159,9 @@ def test_c2r_version_latest_override_inhibitor(convert2rhel, c2r_version, versio c2r.expect("Continue with the system conversion?") c2r.sendline("y") + c2r.expect("Continue with the system conversion?") + c2r.sendline("y") + assert c2r.expect("You are currently running 0.01.0", timeout=300) == 0 assert ( c2r.expect( @@ -176,6 +185,9 @@ def test_clean_cache(convert2rhel): c2r.expect("Continue with the system conversion?") c2r.sendline("y") + c2r.expect("Continue with the system conversion?") + c2r.sendline("y") + assert c2r.expect("Prepare: Clean yum cache metadata", timeout=300) == 0 assert c2r.expect("Cached repositories metadata cleaned successfully.", timeout=300) == 0 @@ -196,6 +208,9 @@ def test_rhsm_error_logged(convert2rhel): c2r.expect("Continue with the system conversion?") c2r.sendline("y") + c2r.expect("Continue with the system conversion?") + c2r.sendline("y") + # Wait until we reach the point where the RHEL certificate has been # installed otherwise we won't attempt to remove it. assert c2r.expect("PRE_SUBSCRIPTION has succeeded") == 0 @@ -260,6 +275,7 @@ def test_analyze_incomplete_rollback(remove_repositories, convert2rhel): with convert2rhel("analyze --debug") as c2r: # We need to get past the data collection acknowledgement c2r.sendline("y") + c2r.sendline("y") # Verify the user is informed to not use the envar during the analysis assert ( c2r.expect( @@ -276,6 +292,7 @@ def test_analyze_incomplete_rollback(remove_repositories, convert2rhel): with convert2rhel("--debug") as c2r: # We need to get past the data collection acknowledgement c2r.sendline("y") + c2r.sendline("y") assert ( c2r.expect( "'CONVERT2RHEL_INCOMPLETE_ROLLBACK' environment variable detected, continuing conversion.", diff --git a/tests/integration/tier0/non-destructive/kernel-modules/test_unsupported_kmod.py b/tests/integration/tier0/non-destructive/kernel-modules/test_unsupported_kmod.py index e2a783ee1b..b923d08195 100644 --- a/tests/integration/tier0/non-destructive/kernel-modules/test_unsupported_kmod.py +++ b/tests/integration/tier0/non-destructive/kernel-modules/test_unsupported_kmod.py @@ -67,6 +67,9 @@ def test_override_inhibitor_with_unavailable_kmod_loaded( c2r.expect("Continue with the system conversion?") c2r.sendline("y") + c2r.expect("Continue with the system conversion?") + c2r.sendline("y") + c2r.expect("Detected 'CONVERT2RHEL_ALLOW_UNAVAILABLE_KMODS' environment variable") c2r.expect("We will continue the conversion with the following kernel modules") @@ -101,6 +104,9 @@ def test_inhibitor_with_force_loaded_tainted_kmod(shell, convert2rhel, forced_km c2r.expect("Continue with the system conversion?") c2r.sendline("y") + c2r.expect("Continue with the system conversion?") + c2r.sendline("y") + assert c2r.expect("TAINTED_KMODS::TAINTED_KMODS_DETECTED - Tainted kernel modules detected") == 0 c2r.sendcontrol("c") @@ -127,6 +133,8 @@ def test_override_inhibitor_with_tainted_kmod(shell, convert2rhel, forced_kmods, # We need to get past the data collection acknowledgement. c2r.expect("Continue with the system conversion?") c2r.sendline("y") + c2r.expect("Continue with the system conversion?") + c2r.sendline("y") # Validate that with the envar the conversion is not inhibited with an error, # but just a warning is displayed and the user is allowed to proceed with a full conversion c2r.expect_exact("(WARNING) TAINTED_KMODS::SKIP_TAINTED_KERNEL_MODULE_CHECK") diff --git a/tests/integration/tier0/non-destructive/kernel/test_custom_kernel.py b/tests/integration/tier0/non-destructive/kernel/test_custom_kernel.py index 35022d8e98..0282e6d3d7 100644 --- a/tests/integration/tier0/non-destructive/kernel/test_custom_kernel.py +++ b/tests/integration/tier0/non-destructive/kernel/test_custom_kernel.py @@ -137,6 +137,9 @@ def test_custom_kernel(convert2rhel, shell, custom_kernel): c2r.expect("Continue with the system conversion?") c2r.sendline("y") + c2r.expect("Continue with the system conversion?") + c2r.sendline("y") + c2r.expect( "WARNING - Custom kernel detected. The booted kernel needs to be signed by {}".format(os_vendor) ) diff --git a/tests/integration/tier0/non-destructive/kernel/test_kernel_check_verification.py b/tests/integration/tier0/non-destructive/kernel/test_kernel_check_verification.py index ed47300a51..65cfca62af 100644 --- a/tests/integration/tier0/non-destructive/kernel/test_kernel_check_verification.py +++ b/tests/integration/tier0/non-destructive/kernel/test_kernel_check_verification.py @@ -40,6 +40,9 @@ def test_verify_latest_kernel_check_passes_with_failed_repoquery(convert2rhel, t c2r.expect("Continue with the system conversion?") c2r.sendline("y") + c2r.expect("Continue with the system conversion?") + c2r.sendline("y") + c2r.expect( "Couldn't fetch the list of the most recent kernels available in the repositories. Did not perform the loaded kernel check.", timeout=300, diff --git a/tests/integration/tier0/non-destructive/logged-command/test_logged_command.py b/tests/integration/tier0/non-destructive/logged-command/test_logged_command.py index 157cb32437..1a11fd6ded 100644 --- a/tests/integration/tier0/non-destructive/logged-command/test_logged_command.py +++ b/tests/integration/tier0/non-destructive/logged-command/test_logged_command.py @@ -40,6 +40,9 @@ def test_logfile_starts_with_command(convert2rhel): c2r.expect("Continue with the system conversion?") c2r.sendline("y") + c2r.expect("Continue with the system conversion?") + c2r.sendline("y") + # After that we can stop the execution. c2r.expect("Prepare: Clear YUM/DNF version locks") c2r.sendcontrol("c") diff --git a/tests/integration/tier0/non-destructive/rollback-handling/test_rollback_handling.py b/tests/integration/tier0/non-destructive/rollback-handling/test_rollback_handling.py index 8f13d6a7ca..bc50479236 100644 --- a/tests/integration/tier0/non-destructive/rollback-handling/test_rollback_handling.py +++ b/tests/integration/tier0/non-destructive/rollback-handling/test_rollback_handling.py @@ -179,6 +179,9 @@ def test_proper_rhsm_clean_up(shell, convert2rhel): c2r.expect("Continue with the system conversion?") c2r.sendline("y") + c2r.expect("Continue with the system conversion?") + c2r.sendline("y") + # Wait till the system is properly registered and subscribed, then # send the interrupt signal to the c2r process. c2r.expect("Prepare: Get RHEL repository IDs") diff --git a/tests/integration/tier0/non-destructive/single-yum-transaction-validation/test_single_yum_transaction_validation.py b/tests/integration/tier0/non-destructive/single-yum-transaction-validation/test_single_yum_transaction_validation.py index 16c8134cdb..f9a4201200 100644 --- a/tests/integration/tier0/non-destructive/single-yum-transaction-validation/test_single_yum_transaction_validation.py +++ b/tests/integration/tier0/non-destructive/single-yum-transaction-validation/test_single_yum_transaction_validation.py @@ -192,6 +192,9 @@ def test_packages_with_in_name_period(shell, convert2rhel, packages_with_period) c2r.expect("Continue with the system conversion", timeout=300) c2r.sendline("y") + c2r.expect("Continue with the system conversion", timeout=300) + c2r.sendline("y") + c2r.expect("VALIDATE_PACKAGE_MANAGER_TRANSACTION has succeeded") assert c2r.exitstatus == 0 diff --git a/tests/integration/tier0/non-destructive/subscription-manager/test_sub_man_pre_register.py b/tests/integration/tier0/non-destructive/subscription-manager/test_sub_man_pre_register.py index 1c3ddf6e79..31dec25c06 100644 --- a/tests/integration/tier0/non-destructive/subscription-manager/test_sub_man_pre_register.py +++ b/tests/integration/tier0/non-destructive/subscription-manager/test_sub_man_pre_register.py @@ -18,6 +18,9 @@ def test_pre_registered_wont_unregister(shell, pre_registered, convert2rhel): c2r.expect("Continue with the system conversion?") c2r.sendline("y") + c2r.expect("Continue with the system conversion?") + c2r.sendline("y") + c2r.expect("Subscription Manager is already present", timeout=300) c2r.expect( "SUBSCRIBE_SYSTEM has succeeded", @@ -49,6 +52,9 @@ def test_pre_registered_re_register(shell, pre_registered, convert2rhel): c2r.expect("Continue with the system conversion?") c2r.sendline("y") + c2r.expect("Continue with the system conversion?") + c2r.sendline("y") + c2r.expect("Registering the system using subscription-manager") c2r.expect("Continue with the system conversion?") c2r.sendline("n") @@ -69,6 +75,9 @@ def test_unregistered_no_credentials(shell, convert2rhel): c2r.expect("Continue with the system conversion?") c2r.sendline("y") + c2r.expect("Continue with the system conversion?") + c2r.sendline("y") + c2r.expect("SUBSCRIBE_SYSTEM::SYSTEM_NOT_REGISTERED - Not registered with RHSM", timeout=300) assert c2r.exitstatus == 2 @@ -86,6 +95,9 @@ def test_no_sca_not_subscribed(shell, pre_registered, convert2rhel): c2r.expect("Continue with the system conversion?") c2r.sendline("y") + c2r.expect("Continue with the system conversion?") + c2r.sendline("y") + c2r.expect("We'll try to auto-attach a subscription") c2r.expect("SUBSCRIBE_SYSTEM has succeeded") c2r.expect("Continue with the system conversion?") @@ -110,6 +122,9 @@ def test_no_sca_subscription_attachment_error(shell, convert2rhel, pre_registere c2r.expect("Continue with the system conversion?") c2r.sendline("y") + c2r.expect("Continue with the system conversion?") + c2r.sendline("y") + c2r.expect("We'll try to auto-attach a subscription") c2r.expect_exact("(ERROR) SUBSCRIBE_SYSTEM::NO_ACCESS_TO_RHEL_REPOS - No access to RHEL repositories") diff --git a/tests/integration/tier0/non-destructive/system-release-backup/test_system_release_backup.py b/tests/integration/tier0/non-destructive/system-release-backup/test_system_release_backup.py index 245007e650..856b98fdc7 100644 --- a/tests/integration/tier0/non-destructive/system-release-backup/test_system_release_backup.py +++ b/tests/integration/tier0/non-destructive/system-release-backup/test_system_release_backup.py @@ -57,6 +57,9 @@ def test_inhibitor_os_release_restored(shell, convert2rhel, fixture_satellite, r c2r.expect("Continue with the system conversion?") c2r.sendline("y") + c2r.expect("Continue with the system conversion?") + c2r.sendline("y") + c2r.expect_exact("set the environment variable 'CONVERT2RHEL_INCOMPLETE_ROLLBACK", timeout=600) # We expect the return code to be 2, given an error is raised assert c2r.exitstatus == 2 @@ -90,6 +93,9 @@ def test_override_inhibitor_os_release_restored( c2r.expect("Continue with the system conversion?") c2r.sendline("y") + c2r.expect("Continue with the system conversion?") + c2r.sendline("y") + c2r.expect("'CONVERT2RHEL_INCOMPLETE_ROLLBACK' environment variable detected, continuing conversion.") c2r.expect("Continue with the system conversion")