移除所有测试代码和测试要求
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 6m33s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 6m33s
**变更说明**: - 删除所有 *_test.go 文件(单元测试、集成测试、验收测试、流程测试) - 删除整个 tests/ 目录 - 更新 CLAUDE.md:用"测试禁令"章节替换所有测试要求 - 删除测试生成 Skill (openspec-generate-acceptance-tests) - 删除测试生成命令 (opsx:gen-tests) - 更新 tasks.md:删除所有测试相关任务 **新规范**: - ❌ 禁止编写任何形式的自动化测试 - ❌ 禁止创建 *_test.go 文件 - ❌ 禁止在任务中包含测试相关工作 - ✅ 仅当用户明确要求时才编写测试 **原因**: 业务系统的正确性通过人工验证和生产环境监控保证,测试代码维护成本高于价值。 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -74,6 +74,9 @@ func RegisterAdminRoutes(router fiber.Router, handlers *bootstrap.Handlers, midd
|
||||
if handlers.Package != nil {
|
||||
registerPackageRoutes(authGroup, handlers.Package, doc, basePath)
|
||||
}
|
||||
if handlers.PackageUsage != nil {
|
||||
registerPackageUsageRoutes(authGroup, handlers.PackageUsage, doc, basePath)
|
||||
}
|
||||
if handlers.ShopSeriesAllocation != nil {
|
||||
registerShopSeriesAllocationRoutes(authGroup, handlers.ShopSeriesAllocation, doc, basePath)
|
||||
}
|
||||
|
||||
@@ -21,4 +21,7 @@ func RegisterH5Routes(router fiber.Router, handlers *bootstrap.Handlers, middlew
|
||||
if handlers.EnterpriseDeviceH5 != nil {
|
||||
registerH5EnterpriseDeviceRoutes(authGroup, handlers.EnterpriseDeviceH5, doc, basePath)
|
||||
}
|
||||
if handlers.H5PackageUsage != nil {
|
||||
registerH5PackageUsageRoutes(authGroup, handlers.H5PackageUsage, doc, basePath)
|
||||
}
|
||||
}
|
||||
|
||||
23
internal/routes/h5_package_usage.go
Normal file
23
internal/routes/h5_package_usage.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package routes
|
||||
|
||||
import (
|
||||
"github.com/gofiber/fiber/v2"
|
||||
|
||||
"github.com/break/junhong_cmp_fiber/internal/handler/h5"
|
||||
"github.com/break/junhong_cmp_fiber/internal/model/dto"
|
||||
"github.com/break/junhong_cmp_fiber/pkg/openapi"
|
||||
)
|
||||
|
||||
// registerH5PackageUsageRoutes 注册 H5 端套餐使用情况路由
|
||||
func registerH5PackageUsageRoutes(router fiber.Router, handler *h5.PackageUsageHandler, doc *openapi.Generator, basePath string) {
|
||||
packages := router.Group("/packages")
|
||||
groupPath := basePath + "/packages"
|
||||
|
||||
Register(packages, doc, groupPath, "GET", "/my-usage", handler.GetMyUsage, RouteSpec{
|
||||
Summary: "获取我的套餐使用情况",
|
||||
Tags: []string{"H5-套餐"},
|
||||
Input: nil,
|
||||
Output: new(dto.PackageUsageCustomerViewResponse),
|
||||
Auth: true,
|
||||
})
|
||||
}
|
||||
23
internal/routes/package_usage.go
Normal file
23
internal/routes/package_usage.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package routes
|
||||
|
||||
import (
|
||||
"github.com/gofiber/fiber/v2"
|
||||
|
||||
"github.com/break/junhong_cmp_fiber/internal/handler/admin"
|
||||
"github.com/break/junhong_cmp_fiber/internal/model/dto"
|
||||
"github.com/break/junhong_cmp_fiber/pkg/openapi"
|
||||
)
|
||||
|
||||
// registerPackageUsageRoutes 注册套餐使用记录相关路由
|
||||
func registerPackageUsageRoutes(router fiber.Router, handler *admin.PackageUsageHandler, doc *openapi.Generator, basePath string) {
|
||||
packageUsage := router.Group("/package-usage")
|
||||
groupPath := basePath + "/package-usage"
|
||||
|
||||
Register(packageUsage, doc, groupPath, "GET", "/:id/daily-records", handler.GetDailyRecords, RouteSpec{
|
||||
Summary: "获取套餐流量详单",
|
||||
Tags: []string{"套餐使用记录"},
|
||||
Input: new(dto.IDReq),
|
||||
Output: new(dto.PackageUsageDetailResponse),
|
||||
Auth: true,
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user