TestRedactSecretNotPresent asserts text without the secret is returned unchanged.
(t *testing.T)
| 53 | |
| 54 | // TestRedactSecretNotPresent asserts text without the secret is returned unchanged. |
| 55 | func TestRedactSecretNotPresent(t *testing.T) { |
| 56 | text := "connection refused" |
| 57 | |
| 58 | got := RedactSecret(text, "sk-secret-upstream-key-1234") |
| 59 | |
| 60 | if got != text { |
| 61 | t.Errorf("RedactSecret() = %q, want unchanged %q", got, text) |
| 62 | } |
| 63 | } |
nothing calls this directly
no test coverage detected