chore(test): 清理测试用例与类型导入

This commit is contained in:
yangjianbo
2026-02-10 00:37:56 +08:00
parent 3fcb0cc37c
commit 29ca1290b3
8 changed files with 20 additions and 71 deletions

View File

@@ -28,9 +28,9 @@ func TestRedactText_QueryLike(t *testing.T) {
}
func TestRedactText_GOCSPX(t *testing.T) {
in := "client_secret=GOCSPX-abcdefghijklmnopqrstuvwxyz_0123456789"
in := "client_secret=GOCSPX-your-client-secret"
out := RedactText(in)
if strings.Contains(out, "abcdefghijklmnopqrstuvwxyz") {
if strings.Contains(out, "your-client-secret") {
t.Fatalf("expected secret redacted, got %q", out)
}
if !strings.Contains(out, "client_secret=***") {