MCPcopy
hub / github.com/multica-ai/multica / TestRedactPasswordEnvVar

Function TestRedactPasswordEnvVar

server/pkg/redact/redact_test.go:156–174  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

154}
155
156func TestRedactPasswordEnvVar(t *testing.T) {
157 t.Parallel()
158 cases := []struct {
159 name string
160 input string
161 }{
162 {"PASSWORD", "PASSWORD=hunter2"},
163 {"SECRET", "SECRET=mysecretvalue"},
164 {"TOKEN", "TOKEN=abc123xyz"},
165 }
166 for _, tc := range cases {
167 t.Run(tc.name, func(t *testing.T) {
168 got := Text(tc.input)
169 if !strings.Contains(got, "[REDACTED CREDENTIAL]") {
170 t.Fatalf("expected credential redaction for %s, got: %s", tc.name, got)
171 }
172 })
173 }
174}
175
176func TestInputMap(t *testing.T) {
177 t.Parallel()

Callers

nothing calls this directly

Calls 2

TextFunction · 0.70
RunMethod · 0.65

Tested by

no test coverage detected