Files
51dj_server/middleware/ginzap/ginzap_test.go
T
2026-10-08 16:50:13 +08:00

18 lines
458 B
Go

package ginzap
import (
"strings"
"testing"
"91jd-server/common/hevcpull"
)
func TestSignedPullQueryIsRedactedBeforeLogging(t *testing.T) {
const signature = "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
query := "hevc_exp=1&hevc_sig=" + signature
safe := hevcpull.RedactText(query)
if strings.Contains(safe, signature) || !strings.Contains(safe, "[REDACTED]") {
t.Fatalf("signed pull query was not redacted: %s", safe)
}
}