优化结构

This commit is contained in:
Yvan
2026-08-30 01:08:10 +08:00
parent 509df03d61
commit e0c35e4e9b
23 changed files with 1513 additions and 38 deletions
+8
View File
@@ -33,6 +33,14 @@ func TestResponseHelpers(t *testing.T) {
}
}
func TestSanitizeFailureMessageKeepsSafeConnectionSummary(t *testing.T) {
for _, message := range []string{"Kafka 连接测试失败", "EMQX 连接测试失败", "RabbitMQ 连接测试失败"} {
if got := sanitizeFailureMessage(message); got != message {
t.Fatalf("sanitizeFailureMessage(%q) = %q", message, got)
}
}
}
func TestSetCookieUsesRequestedName(t *testing.T) {
gin.SetMode(gin.TestMode)
r := gin.New()