Implement notifications service with shared messaging and email drivers (#36)

This commit is contained in:
Stephan D committed 2026-09-12 14:41:55 +02:00
1 parent 36277b6c45
commit 5c2d36281b
54 files changed
+3746 -6

No files matched your search

@@ -0,0 +1,15 @@
package natsb
import (
"strings"
"testing"
)
func TestLogsRedactNATSCredentials(t *testing.T) {
for _, url := range []string{"nats://secret-user:secret-password@localhost:4222", "nats://secret-token@localhost:4222", "nats://localhost:4222?token=secret-token", "invalid secret-password"} {
safe := buildSafePublishableNATSURL(url)
if strings.Contains(safe, "secret") {
t.Fatalf("credential leaked: %q", safe)
}
}
}