test(server): 添加服务器模块覆盖测试(覆盖率 78.6% → 83.3%)
新建 internal/server/coverage_test.go,覆盖: GetTLSConfig 测试(原 66.7% → 100%): - 完整 TLS 配置生成 - HSTS 头部设置 - 自动 HTTP→HTTPS 重定向 registerLuaRoutesWithLocationEngine 测试(原 12.5% → 87.5%): - Lua 路由注册到 location engine - 多路由注册 - 无 Lua 路由时的处理 注:start* 系列函数(startSingleMode、startMultiServerMode、startServer) 由于涉及真实网络监听,更适合由 integration/e2e 测试覆盖。
This commit is contained in:
parent
164589a9cc
commit
9ae7a2b8ef
1122
internal/server/coverage_test.go
Normal file
1122
internal/server/coverage_test.go
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user