1
0
mirror of https://github.com/containous/traefik.git synced 2024-10-26 17:25:15 +03:00

refactor: unflaky access log.

This commit is contained in:
Fernandez Ludovic 2017-09-15 22:19:10 +02:00 committed by Traefiker
parent ce3b255f1a
commit 2296aab5a8

View File

@ -97,7 +97,7 @@ func CheckAccessLogFormat(c *check.C, line string, i int) {
tokens, err := shellwords.Parse(line)
c.Assert(err, checker.IsNil)
c.Assert(tokens, checker.HasLen, 14)
c.Assert(tokens[6], checker.Matches, `^\d{3}$`)
c.Assert(tokens[6], checker.Matches, `^(-|\d{3})$`)
c.Assert(tokens[10], checker.Equals, fmt.Sprintf("%d", i+1))
c.Assert(tokens[11], checker.HasPrefix, "frontend")
c.Assert(tokens[12], checker.HasPrefix, "http://127.0.0.1:808")