V10.426 deduplicate 111 proxy reject logs

This commit is contained in:
OoO
2026-05-24 15:50:39 +08:00
parent 0208c014d2
commit 1717dad3d7
5 changed files with 20 additions and 4 deletions

View File

@@ -21,3 +21,11 @@ def test_ollama111_proxy_logs_to_stdout_for_launchagent_collection():
assert "import sys" in proxy_source
assert "stream=sys.stdout" in proxy_source
def test_ollama111_proxy_reject_logs_are_deduplicated():
proxy_source = (ROOT / "scripts/ops/ollama111_allow_proxy.py").read_text()
assert "OLLAMA111_PROXY_REJECT_LOG_DEDUP_SEC" in proxy_source
assert "_LAST_REJECT_LOG" in proxy_source
assert "now - last_log >= REJECT_LOG_DEDUP_SEC" in proxy_source