ändrar sattus ollama

This commit is contained in:
larssand
2026-07-06 11:31:06 +02:00
parent b7f49214cb
commit 2f208c91ca
4 changed files with 15 additions and 3 deletions

View File

@@ -196,7 +196,7 @@ class MonitorTests(unittest.TestCase):
self.assertEqual(status["llm_assessment"]["status"], "ok")
self.assertEqual(status["llm_assessment"]["text"], "looks noisy")
def test_profile_advisor_status_records_error(self):
def test_profile_advisor_status_records_heuristic_fallback(self):
with tempfile.TemporaryDirectory() as tmp:
log_path = Path(tmp) / "events.log"
log_path.write_text("fgai_stream_id=windows fgai_stream=Windows username=alice eventid=4625 action=failure\n", encoding="utf-8")
@@ -207,8 +207,9 @@ class MonitorTests(unittest.TestCase):
status = build_status(str(log_path), config_path=str(config_path), incident_path=str(Path(tmp) / "incidents.json"))
advisor = status["capabilities"]["profile_advisor"]
self.assertEqual(advisor["status"], "error")
self.assertEqual(advisor["status"], "heuristic_fallback")
self.assertIn("timeout", advisor["error"])
self.assertEqual(advisor["candidates"], 1)
self.assertEqual(status["profile_suggestions"][0]["profile_advisor"]["status"], "heuristic")
self.assertIn("timeout", status["profile_suggestions"][0]["profile_advisor"]["error"])