MCPcopy Create free account
hub / github.com/zalando/skipper / TestAccessLogFormatJSONWithMaskedQueryParameters

Function TestAccessLogFormatJSONWithMaskedQueryParameters

logging/access_test.go:125–136  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

123}
124
125func TestAccessLogFormatJSONWithMaskedQueryParameters(t *testing.T) {
126 additional := map[string]any{al.KeyMaskedQueryParams: map[string]struct{}{"foo": {}}}
127
128 params := url.Values{}
129 params.Add("foo", "bar")
130 testAccessLogExtended(t,
131 testAccessEntryWithQueryParameters(params),
132 additional,
133 `{"audit":"","auth-user":"","duration":42,"flow-id":"","host":"127.0.0.1","level":"info","method":"GET","msg":"","proto":"HTTP/1.1","referer":"","requested-host":"example.com","response-size":2326,"status":418,"timestamp":"10/Oct/2000:13:55:36 -0700","uri":"/apache_pb.gif?foo=5234164152756840025","user-agent":""}`,
134 Options{AccessLogJSONEnabled: true},
135 )
136}
137
138func TestAccessLogIgnoresEmptyEntry(t *testing.T) {
139 testAccessLogDefault(t, nil, "")

Callers

nothing calls this directly

Calls 3

testAccessLogExtendedFunction · 0.85
AddMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…