(t *testing.T)
| 86 | } |
| 87 | |
| 88 | func TestRedactorWrapRedactor(t *testing.T) { |
| 89 | wrapped := &testRedactor{ |
| 90 | msg: "wrapped sensitive", |
| 91 | redactedMsg: "wrapped safe", |
| 92 | } |
| 93 | err := &testRedactor{ |
| 94 | msg: "sensitive", |
| 95 | redactedMsg: "safe", |
| 96 | err: wrapped, |
| 97 | } |
| 98 | checkUnredactedError(t, err, "sensitive") |
| 99 | checkRedactedError(t, err, "safe") |
| 100 | if !errors.Is(err, wrapped) { |
| 101 | t.Error("got errors.Is(err, wrapped) == false") |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | func TestSimpleWrapRedactor(t *testing.T) { |
| 106 | wrapped := &testRedactor{ |
nothing calls this directly
no test coverage detected