linting
This commit is contained in:
@@ -11,6 +11,7 @@ func TestBuildSafePublishableNATSURL(t *testing.T) {
|
||||
t.Run("redacts single URL credentials", func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
//nolint:gosec // Test fixture includes credentials to verify redaction logic.
|
||||
raw := "nats://alice:supersecret@localhost:4222"
|
||||
sanitized := buildSafePublishableNATSURL(raw)
|
||||
|
||||
@@ -25,6 +26,7 @@ func TestBuildSafePublishableNATSURL(t *testing.T) {
|
||||
t.Run("redacts credentials in gateway URL format", func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
//nolint:gosec // Test fixture includes credentials to verify redaction logic.
|
||||
raw := "nats://dev_nats:nats_password_123@dev-nats:4222"
|
||||
sanitized := buildSafePublishableNATSURL(raw)
|
||||
|
||||
@@ -49,6 +51,7 @@ func TestBuildSafePublishableNATSURL(t *testing.T) {
|
||||
t.Run("redacts each URL in server list", func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
//nolint:gosec // Test fixture includes credentials to verify redaction logic.
|
||||
raw := " nats://alice:one@localhost:4222, nats://bob:two@localhost:4223 "
|
||||
sanitized := buildSafePublishableNATSURL(raw)
|
||||
|
||||
@@ -73,6 +76,7 @@ func TestBuildSafePublishableNATSURL(t *testing.T) {
|
||||
t.Run("redacts malformed URL credentials via fallback", func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
//nolint:gosec // Test fixture includes credentials to verify redaction logic.
|
||||
raw := "nats://alice:pa%ss@localhost:4222"
|
||||
sanitized := buildSafePublishableNATSURL(raw)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user