From f6eccfb25cd9c40ddb1e871f323e0575d023e1e6 Mon Sep 17 00:00:00 2001 From: MacRimi Date: Sun, 4 Oct 2026 21:03:22 +0200 Subject: [PATCH] test(oci): give the extracted menu functions the recovery helpers The menu registers restored containers and refreshes the carried record before it lists or manages an instance. The tests that run those menu functions in isolation provide the new helpers they call. --- .github/scripts/tests/test_oci_selection_setup_wording.py | 2 ++ .github/scripts/tests/test_oci_update_preservation_wording.py | 1 + 2 files changed, 3 insertions(+) diff --git a/.github/scripts/tests/test_oci_selection_setup_wording.py b/.github/scripts/tests/test_oci_selection_setup_wording.py index 54777705..47a6fc4c 100644 --- a/.github/scripts/tests/test_oci_selection_setup_wording.py +++ b/.github/scripts/tests/test_oci_selection_setup_wording.py @@ -41,6 +41,8 @@ class SelectionSetupWording(TestCase): fn = extracted('_interactive_management', os=SimpleNamespace(geteuid=lambda: 0), shutil=SimpleNamespace(which=lambda _: '/fake/pct'), saved_inventory=lambda _: [], _clean_orphans=lambda project: None, + recover_automatically=lambda project: None, offer_recovery=lambda project, ui: None, + carry_records=lambda project, **options: {}, translate=lambda s: s) fn(Path('/fixture'), ui) ui.message.assert_called_once_with(EMPTY, 'OCI management') diff --git a/.github/scripts/tests/test_oci_update_preservation_wording.py b/.github/scripts/tests/test_oci_update_preservation_wording.py index 59c8ec66..6d42fa75 100644 --- a/.github/scripts/tests/test_oci_update_preservation_wording.py +++ b/.github/scripts/tests/test_oci_update_preservation_wording.py @@ -130,6 +130,7 @@ class UpdateWording(unittest.TestCase): scope = {'sys': SimpleNamespace(path=[], executable='python3'), 'translate': lambda text: text, 'check_selected': lambda project, row: row, 'images': SimpleNamespace(offer_removal=lambda *args: None), + 'carry_records': lambda project, **options: {}, '_run_lifecycle': lambda command, title: events.append(('run', command, title)) or True} row = {'vmid': 101, 'reason': 'matched', 'stack': False, 'pending': False, 'status': 'installed'} decision = False