MCPcopy Index your code
hub / github.com/jetify-com/devbox / TestRedactorWrapRedactor

Function TestRedactorWrapRedactor

internal/redact/redact_test.go:88–103  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

86}
87
88func 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
105func TestSimpleWrapRedactor(t *testing.T) {
106 wrapped := &testRedactor{

Callers

nothing calls this directly

Calls 4

checkUnredactedErrorFunction · 0.85
checkRedactedErrorFunction · 0.85
IsMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected