完善服务端交互日志与初始化测试
统一划分 MTOP 与 WebSocket 日志等级,增加 Token 安全指纹和请求耗时诊断;补充 init-admin 临时数据库测试;同步 README 的镜像发布说明。
This commit is contained in:
1 parent
ad224bf4e9
commit
d7abbfb2b6
16 files changed
+274
-74
No files matched your search
@@ -76,3 +76,19 @@ func TestCredentialStateFingerprintIncludesAuthoritativeSnapshot(t *testing.T) {
|
||||
t.Fatal("权威空 Jar 必须与没有快照的历史状态区分")
|
||||
}
|
||||
}
|
||||
|
||||
func TestTokenFingerprintIsStableNonReversibleDiagnosticID(t *testing.T) {
|
||||
first := tokenFingerprint("access-token-a")
|
||||
if first == "" || len(first) != 12 {
|
||||
t.Fatalf("token fingerprint=%q, want 12 hex chars", first)
|
||||
}
|
||||
if first != tokenFingerprint("access-token-a") {
|
||||
t.Fatal("same token must produce stable fingerprint")
|
||||
}
|
||||
if first == tokenFingerprint("access-token-b") {
|
||||
t.Fatal("different tokens must produce different fingerprints")
|
||||
}
|
||||
if first == "access-token-a" {
|
||||
t.Fatal("fingerprint must not expose the token")
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user