(t *testing.T)
| 116 | } |
| 117 | |
| 118 | func TestSanitizeErrorMessage_MixedCase(t *testing.T) { |
| 119 | tests := []struct { |
| 120 | name string |
| 121 | message string |
| 122 | expected string |
| 123 | }{ |
| 124 | { |
| 125 | name: "lowercase not matched", |
| 126 | message: "error with my_secret_key", |
| 127 | expected: "error with my_secret_key", |
| 128 | }, |
| 129 | { |
| 130 | name: "mixed case not matched", |
| 131 | message: "error with My_Secret_Key", |
| 132 | expected: "error with My_Secret_Key", |
| 133 | }, |
| 134 | { |
| 135 | name: "all uppercase matched", |
| 136 | message: "error with MY_SECRET_KEY", |
| 137 | expected: "error with [REDACTED]", |
| 138 | }, |
| 139 | } |
| 140 | |
| 141 | for _, tt := range tests { |
| 142 | t.Run(tt.name, func(t *testing.T) { |
| 143 | result := SanitizeErrorMessage(tt.message) |
| 144 | assertSanitizeResult(t, "SanitizeErrorMessage", tt.message, result, tt.expected) |
| 145 | }) |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | func TestSanitizeErrorMessage_PascalCaseVariants(t *testing.T) { |
| 150 | tests := []struct { |
nothing calls this directly
no test coverage detected