Skip to content

good first issue: 补充业务 handler 的单元测试 #3

Description

@XM-Vance

背景

目前后端测试主要集中在 auth/config/server 几个核心包,业务 handler(客户、合同、结算等)的单元测试覆盖不足。

目标

为以下 handler 补充单元测试(可用 mock 或测试 DB):

  • customers.go — 客户 CRUD
  • trade_rule.go(handler)— 交易规则 CRUD
  • settlement.go — 结算查询

接入点

  • 参考现有测试:backend/internal/handler/customers_test.gosmoke_test.go
  • 测试工具:Go 标准 testing

验证

cd backend && go test ./internal/handler/ -v 新增的测试通过,且能覆盖正常 + 错误路径。

适合想熟悉 Go 测试 + OpenPTS 业务逻辑的开发者,每个 handler 可单独认领。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions