增加气站合同附件受控上传与预览

This commit is contained in:
czl231
2026-08-18 21:52:00 +08:00
parent 06b6f0ee62
commit 61a61f916b
9 changed files with 262 additions and 9 deletions

View File

@@ -100,3 +100,23 @@ func TestGasAvatarRoutes(t *testing.T) {
}
}
}
// TestGasContractAttachmentRoutes 验证合同附件通过气站鉴权域提供专用接口。
func TestGasContractAttachmentRoutes(t *testing.T) {
gin.SetMode(gin.TestMode)
engine := gin.New()
RegisterGas("heqi", engine)
routes := map[string]bool{}
for _, route := range engine.Routes() {
routes[route.Method+" "+route.Path] = true
}
for _, path := range []string{
"POST /heqi/gas/v1/gasorder_contract/attachment/upload",
"POST /heqi/gas/v1/gasorder_contract/attachment/cleanup",
"GET /heqi/gas/v1/gasorder_contract/:identity/attachment",
} {
if !routes[path] {
t.Fatalf("missing gas contract attachment route %s", path)
}
}
}