fix(ops): report Ollama embed failures accurately
Some checks failed
CD Pipeline / deploy (push) Has been cancelled

This commit is contained in:
ogt
2026-07-10 21:56:00 +08:00
parent b8cc27e4c4
commit 5dde049a07
3 changed files with 60 additions and 9 deletions

View File

@@ -0,0 +1,15 @@
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
def test_embedding_probe_failure_is_not_reported_as_version_skip():
script = (ROOT / "scripts" / "ops" / "diagnose_ollama_gcp_failover.sh").read_text(
encoding="utf-8"
)
assert 'if [[ "$primary_version_ok" == "1" ]]; then' in script
assert 'if [[ "$secondary_version_ok" == "1" ]]; then' in script
assert 'embed_probe "GCP-B embed" "$SECONDARY_URL" || true' in script
assert '&& embed_probe "GCP-B embed"' not in script