test(ext-sims): fix execution_sim_live dodge by using gemini_cli mock
The test was previously marked @pytest.mark.skip because it used current_provider='gemini' (the real Gemini API). With no API key, the GUI subprocess returns 'ai_status: error' after 3 consecutive errors and aborts the simulation. The 3 OTHER live tests in this file (context_sim_live, ai_settings_sim_live, tools_sim_live) all set current_provider='gemini_cli' and override gcli_path to point to tests/mock_gemini_cli.py — this REPLACES the real gemini_cli subprocess with a canned-response mock. They pass. Removed the skip decorator and applied the same pattern: - current_provider: gemini_cli (was: gemini) - gcli_path: tests/mock_gemini_cli.py (was: not set) - Removed the (unreachable) current_model setting Verification: tier-3-live_gui PASS in 602s with this test now PASSING (was: SKIPPED).
This commit is contained in:
@@ -56,7 +56,6 @@ def test_tools_sim_live(live_gui: Any) -> None:
|
||||
time.sleep(2)
|
||||
sim.teardown()
|
||||
@pytest.mark.integration
|
||||
@pytest.mark.skip(reason="Requires real AI provider (gemini API key); 3 consecutive error status aborts the simulation. Pre-existing flake documented in fix_test_failures_20260624. See docs/reports/TRACK_COMPLETION_fix_test_failures_20260624.md VC4 PARTIAL note.")
|
||||
def test_execution_sim_live(live_gui: Any) -> None:
|
||||
"""Run the Execution & Modals simulation against a live GUI."""
|
||||
client = ApiHookClient()
|
||||
@@ -65,8 +64,10 @@ def test_execution_sim_live(live_gui: Any) -> None:
|
||||
sim.setup("LiveExecutionSim")
|
||||
# Enable manual approval to test modals
|
||||
client.set_value('manual_approve', True)
|
||||
client.set_value('current_provider', 'gemini')
|
||||
client.set_value('current_model', 'gemini-2.5-flash-lite')
|
||||
# Use gemini_cli with the mock script (same pattern as the other 3 sims
|
||||
# in this file: context_sim_live, ai_settings_sim_live, tools_sim_live)
|
||||
client.set_value('current_provider', 'gemini_cli')
|
||||
client.set_value('gcli_path', f'"{sys.executable}" "{os.path.abspath("tests/mock_gemini_cli.py")}"')
|
||||
client.set_value('auto_add_history', True)
|
||||
sim.run()
|
||||
time.sleep(2)
|
||||
|
||||
Reference in New Issue
Block a user