优化结构

This commit is contained in:
Yvan
2026-08-21 11:16:12 +08:00
parent 055f6811ca
commit e81a641953
13 changed files with 432 additions and 7 deletions
+2 -1
View File
@@ -50,6 +50,7 @@ func TestGinRouteContract(t *testing.T) {
"GET /integration/configs/:kind/:provider",
"PUT /integration/configs/:kind/:provider",
"DELETE /integration/configs/:kind/:provider",
"POST /payment/providers/:provider/test",
} {
if !strings.Contains(value, route) {
t.Fatalf("route contract missing %s:\n%s", route, value)
@@ -70,7 +71,7 @@ func TestGinStartupLogsEveryRegisteredRoute(t *testing.T) {
if got, want := strings.Count(text, `"msg":"router registered"`), len(engine.Routes()); got != want {
t.Fatalf("registered route log count = %d, want %d", got, want)
}
if !strings.Contains(text, `"msg":"router register success"`) || !strings.Contains(text, `"route_count":192`) {
if !strings.Contains(text, `"msg":"router register success"`) || !strings.Contains(text, `"route_count":193`) {
t.Fatalf("startup route summary is missing: %s", text)
}
}