feat: add runnable control-plane API role

This commit is contained in:
Josh Creek
2026-09-01 09:24:05 +01:00
parent 18888ed520
commit fe9f6f3cb5
4 changed files with 100 additions and 1 deletions
+16
View File
@@ -0,0 +1,16 @@
package main
import (
"net/http"
"net/http/httptest"
"testing"
)
func TestAPIHandlerExposesHealthWithoutDatabase(t *testing.T) {
req := httptest.NewRequest(http.MethodGet, "/healthz", nil)
rec := httptest.NewRecorder()
newAPIHandler(nil).ServeHTTP(rec, req)
if rec.Code != http.StatusOK {
t.Fatalf("health status = %d", rec.Code)
}
}