refactor: add unified all service gateway

This commit is contained in:
2026-08-10 10:03:46 +08:00
parent 5ea45a76fe
commit f994b2de9c
143 changed files with 2853 additions and 2129 deletions

View File

@@ -0,0 +1,21 @@
package server
import (
"net/http"
"net/http/httptest"
"testing"
"github.com/gin-gonic/gin"
)
func TestHTTPRouterIsAvailable(t *testing.T) {
srv := New()
srv.HTTP.GET("/healthz", func(c *gin.Context) { c.Status(http.StatusNoContent) })
request := httptest.NewRequest(http.MethodGet, "/healthz", nil)
response := httptest.NewRecorder()
srv.HTTP.ServeHTTP(response, request)
if response.Code != http.StatusNoContent {
t.Fatalf("unexpected status: %d", response.Code)
}
}