test: add comprehensive test coverage and improve code quality

- Add new test files for auth, service, and handler modules
- Improve test organization and coverage
- Refactor code for better maintainability
- Add captcha, settings, stats, and theme handler tests
- Add auth module tests (CAS, OAuth, password, SSO, state)
- Add service layer tests for auth, export, permissions, roles
- All Go tests pass (exit code 0)
- All frontend tests pass (325 tests in 59 files)
This commit is contained in:
2026-04-17 20:43:50 +08:00
parent 0d66aa0423
commit 582ad7a069
136 changed files with 19010 additions and 8544 deletions

View File

@@ -91,8 +91,8 @@ func (h *DeviceHandler) GetMyDevices(c *gin.Context) {
"message": "success",
"data": gin.H{
"items": devices,
"total": total,
"page": page,
"total": total,
"page": page,
"page_size": pageSize,
},
})
@@ -305,8 +305,8 @@ func (h *DeviceHandler) GetUserDevices(c *gin.Context) {
"message": "success",
"data": gin.H{
"items": devices,
"total": total,
"page": page,
"total": total,
"page": page,
"page_size": pageSize,
},
})
@@ -359,8 +359,8 @@ func (h *DeviceHandler) GetAllDevices(c *gin.Context) {
"message": "success",
"data": gin.H{
"items": devices,
"total": total,
"page": req.Page,
"total": total,
"page": req.Page,
"page_size": req.PageSize,
},
})