test: add service layer unit tests for webhook/metadata/error/config

- webhook_service_test.go: isPrivateIP, isSafeURL, computeHMAC
- request_metadata_test.go: context functions
- classified_error_test.go: error types
- config_defaults_test.go: password reset/SMS defaults
- email_config_test.go: email code defaults
- auth_runtime_test.go: isUserNotFoundError

Service coverage: 11.2% -> 14.7%
This commit is contained in:
2026-04-09 15:30:26 +08:00
parent a6a0e58340
commit a3e090e821
13 changed files with 12024 additions and 19 deletions

View File

@@ -67,7 +67,13 @@
"Bash(while read:*)",
"Bash(do basename:*)",
"Bash(dir \"D:\\\\project\\\\frontend\")",
"Bash(grep -E '\\\\.txt$')"
"Bash(grep -E '\\\\.txt$')",
"Bash(go tool:*)",
"Bash(sort -t: -k2 -rn)",
"Bash(sort -t: -k3 -rn)",
"Bash(gosec ./...)",
"Bash(gosec -no-fail ./internal/...)",
"Bash(gosec -no-fail -quiet ./internal/...)"
]
}
}