feat: add platform resource audit baseline

This commit is contained in:
2026-07-27 01:11:38 +08:00
parent 7609d3234a
commit e730343093
5 changed files with 150 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
package routers
import (
"testing"
"github.com/gin-gonic/gin"
)
func TestPlatformGasRouteUsesGasBasic(t *testing.T) {
engine := gin.New()
RegisterPlatform("heqi", engine)
for _, route := range engine.Routes() {
if route.Path == "/heqi/platform/v1/gas/gas_station" {
t.Fatal("gas station route must use gas_basic as its resource name")
}
if route.Method == "GET" && route.Path == "/heqi/platform/v1/gas/gas_basic" {
return
}
}
t.Fatal("gas_basic list route is not registered")
}