Pin the Ollama probe in the curated-models test

The picker gates ollama:* on a live local probe, so this passed only where Ollama runs and failed in CI.
The probe's own behaviour stays covered by test_ollama_models_gated_on_liveness.
This commit is contained in:
Rohit C Prasad
2026-07-24 12:48:38 -07:00
parent 4766e59c47
commit 2325728f3f
+6
View File
@@ -322,6 +322,12 @@ def test_manager_curated_models(tmp_path, monkeypatch):
monkeypatch.delenv(d.env_key, raising=False)
from coworker.server.manager import SessionManager
# `ollama:*` selectability is an HTTP probe of a local server; pin it so this test
# covers picker mechanics only (the probe itself is covered by
# test_settings.py::test_ollama_models_gated_on_liveness). Unpinned, the ollama
# assertions below pass only where Ollama happens to run — green on a dev box, red in CI.
monkeypatch.setattr(SessionManager, "_ollama_alive", lambda self: True)
mgr = SessionManager(data_dir=tmp_path)
# no provider keys → nothing but the always-selectable default
assert mgr.get_settings()["models"] == [mgr.model]