Files
tmpl-test-go/main_test.go
Scaffolder c8792e4486
All checks were successful
Build and Push to ACR / Build and Push (push) Successful in 7m17s
initial commit
Change-Id: I15ddbaddac362bcec0e791a2508c9376349d177c
2026-03-24 23:32:49 +00:00

17 lines
300 B
Go

package main
import (
"net/http"
"net/http/httptest"
"testing"
)
func TestHealth(t *testing.T) {
req := httptest.NewRequest(http.MethodGet, "/health", nil)
rec := httptest.NewRecorder()
healthHandler(rec, req)
if rec.Code != http.StatusOK {
t.Fatalf("expected 200, got %d", rec.Code)
}
}