feat: 重建 Bell GoAdmin 产品骨架 (#62)

This commit is contained in:
QiuSW
2026-08-27 18:20:40 +08:00
parent b37c350096
commit f5a3dd796b
715 changed files with 75278 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
package api
import (
"net/http"
"net/http/httptest"
"strings"
"testing"
"github.com/gin-gonic/gin"
)
func TestHealthRouteIdentifiesBell(t *testing.T) {
gin.SetMode(gin.TestMode)
router := gin.New()
registerHealthRoute(router)
recorder := httptest.NewRecorder()
request := httptest.NewRequest(http.MethodGet, "/healthz", nil)
router.ServeHTTP(recorder, request)
if recorder.Code != http.StatusOK || !strings.Contains(recorder.Body.String(), `"service":"bell"`) {
t.Fatalf("unexpected health response: %d %s", recorder.Code, recorder.Body.String())
}
}