Files
sub2api/openspec/changes/add-delete-unit-tests/tasks.md
yangjianbo f6de36cb04 test(删除): 添加删除单测并修复中间件测试
新增 AdminService 删除路径单元测试与规范场景更新\n同步调整 Google API Key 中间件测试桩与签名
2025-12-29 15:01:19 +08:00

12 lines
793 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## 1. Implementation
- [x] 1.1 为 AdminService 删除入口准备测试替身user/group/proxy/redeem repo 与 cache
- [x] 1.2 新增 AdminService.DeleteUser 单元测试(成功/不存在/错误传播/管理员保护)
- [x] 1.3 新增 AdminService.DeleteGroup 单元测试(成功/不存在/错误传播,缓存失效逻辑如适用)
- [x] 1.4 新增 AdminService.DeleteProxy 单元测试(成功/幂等删除/错误传播)
- [x] 1.5 新增 AdminService.DeleteRedeemCode 与 BatchDeleteRedeemCodes 单元测试(成功/幂等删除/错误传播/部分失败)
- [x] 1.6 运行 unit 测试并将结果记录在本 tasks.md 末尾
## Test Results
- `go test -tags=unit ./internal/service/...` (workdir: `backend`)
- ok github.com/Wei-Shaw/sub2api/internal/service 0.475s