From cf41be9eff0460713d783586968af3da670ccde0 Mon Sep 17 00:00:00 2001 From: Ilia Denisov Date: Thu, 7 May 2026 08:24:25 +0200 Subject: [PATCH] fix: mock /healthz in runtime service e2e test TestServiceStartGameEndToEnd's httptest server had no handler for /healthz, the path engineclient.Healthz probes after a runtime container starts. Without it the runtime never transitions out of starting state and the test fails on its 5s deadline. Surfaced by introducing CI that runs the backend service tests outside the integration harness. Co-Authored-By: Claude Opus 4.7 --- backend/internal/runtime/service_e2e_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/internal/runtime/service_e2e_test.go b/backend/internal/runtime/service_e2e_test.go index c045b2b..78362c6 100644 --- a/backend/internal/runtime/service_e2e_test.go +++ b/backend/internal/runtime/service_e2e_test.go @@ -200,6 +200,8 @@ func TestServiceStartGameEndToEnd(t *testing.T) { engineSrv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") switch r.URL.Path { + case "/healthz": + w.WriteHeader(http.StatusOK) case "/api/v1/admin/init": _ = json.NewEncoder(w).Encode(rest.StateResponse{ID: gameID, Turn: 0, Players: []rest.PlayerState{{RaceName: "Alpha", Planets: 3, Population: 10}}}) case "/api/v1/admin/status":