1
0
Fork 0

Fix bad access log

This commit is contained in:
Michael 2018-01-11 10:04:03 +01:00 committed by Traefiker
parent ee71b4bfef
commit 709d50836b
10 changed files with 763 additions and 143 deletions

View file

@ -35,7 +35,7 @@ func TestCommonLogFormatter_Format(t *testing.T) {
FrontendName: "",
BackendURL: "",
},
expectedLog: `10.0.0.1 - Client [10/Nov/2009:23:00:00 +0000] "GET /foo http" - - - - 0 - - 123000ms
expectedLog: `10.0.0.1 - Client [10/Nov/2009:23:00:00 +0000] "GET /foo http" - - "-" "-" 0 - - 123000ms
`,
},
{
@ -106,7 +106,7 @@ func Test_toLog(t *testing.T) {
t.Run(test.name, func(t *testing.T) {
t.Parallel()
lg := toLog(test.value)
lg := toLog(test.value, defaultValue)
assert.Equal(t, test.expectedLog, lg)
})