server: use uppercase per-upstream status in /health; verify in tests

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I26a71054250c71747e92c2803d8c39ed6a6a6964
This commit is contained in:
raf 2026-03-06 22:37:27 +03:00
commit a45ee57da7
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
2 changed files with 21 additions and 1 deletions

View file

@ -84,7 +84,7 @@ func (s *Server) handleHealth(w http.ResponseWriter, _ *http.Request) {
for i, h := range sorted {
upstreams[i] = upstreamStatus{
URL: h.URL,
Status: strings.ToLower(h.Status.String()),
Status: h.Status.String(),
LatencyMs: h.EMALatency,
ConsecutiveFails: h.ConsecutiveFails,
}