ЛР7: прогон в Docker, исправления по результатам, evidence и отчёт
Skeleton contracts / contracts (pull_request) Blocked by required conditions

This commit is contained in:
LOSYASH
2026-12-03 16:54:53 +01:00
parent cbbe525b3e
commit 17baa0dd7e
47 changed files with 1934 additions and 65 deletions
+10 -2
View File
@@ -217,8 +217,16 @@ def main():
if not tel.direct:
for uid in ("prom", "loki", "tempo"):
st, h = tel.get(f"{tel.grafana}/api/datasources/uid/{uid}/health")
rep.check(st == 200 and isinstance(h, dict) and h.get("status") == "OK",
f"Grafana datasource {uid}: {h.get('message', h) if isinstance(h, dict) else h}")
msg = h.get("message", h) if isinstance(h, dict) else h
if uid == "tempo" and msg == "Method not implemented":
# Health API у плагина Tempo в Grafana 11 не реализован — проверяем сам путь
# Grafana → Tempo (mTLS сертификатом grafana) запросом через datasource proxy.
st, d = tel.get(f"{tel.grafana}/api/datasources/proxy/uid/tempo/api/search", {"limit": 1})
rep.check(st == 200 and isinstance(d, dict) and "traces" in d,
f"Grafana datasource tempo: health API не реализован плагином; "
f"поиск через datasource (mTLS) → {st}, трасс: {len(d.get('traces', [])) if isinstance(d, dict) else d}")
continue
rep.check(st == 200 and isinstance(h, dict) and h.get("status") == "OK", f"Grafana datasource {uid}: {msg}")
st, dash = tel.get(f"{tel.grafana}/api/dashboards/uid/messenger-lab6")
panels = [p for p in dash.get("dashboard", {}).get("panels", []) if p.get("type") != "row"] if st == 200 else []
rep.check(st == 200 and len(panels) >= 15,