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

Function TestSimpleWrapRedactor

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

Source from the content-addressed store, hash-verified

103}
104
105func TestSimpleWrapRedactor(t *testing.T) {
106 wrapped := &testRedactor{
107 msg: "wrapped sensitive",
108 redactedMsg: "wrapped safe",
109 }
110 err := fmt.Errorf("error: %w", wrapped)
111 checkUnredactedError(t, err, "error: wrapped sensitive")
112 checkRedactedError(t, err, "<redacted *fmt.wrapError>: wrapped safe")
113 if !errors.Is(err, wrapped) {
114 t.Error("got errors.Is(err, wrapped) == false")
115 }
116}
117
118func TestNestedWrapRedactor(t *testing.T) {
119 nestedWrapped := &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