(t *testing.T)
| 96 | } |
| 97 | |
| 98 | func TestAccessLogWithContext(t *testing.T) { |
| 99 | entry := testAccessEntry() |
| 100 | traceID := "c4ddfe9d-a0d3-4afb-bf26-24b9588731a0" |
| 101 | entry.Request = entry.Request.WithContext(context.WithValue(entry.Request.Context(), accessLogContextKey{}, traceID)) |
| 102 | expectedOutput := traceID |
| 103 | |
| 104 | var buf bytes.Buffer |
| 105 | o := Options{ |
| 106 | AccessLogOutput: &buf, |
| 107 | AccessLogFormatter: &accessCustomFormatter{}, |
| 108 | } |
| 109 | |
| 110 | testAccessLog(t, entry, expectedOutput, o) |
| 111 | } |
| 112 | |
| 113 | func TestAccessLogFormatFull(t *testing.T) { |
| 114 | testAccessLogDefault(t, testAccessEntry(), logOutput) |
nothing calls this directly
no test coverage detected
searching dependent graphs…