(t *testing.T)
| 123 | } |
| 124 | |
| 125 | func 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 | |
| 138 | func TestAccessLogIgnoresEmptyEntry(t *testing.T) { |
| 139 | testAccessLogDefault(t, nil, "") |
nothing calls this directly
no test coverage detected
searching dependent graphs…