comparison tests/test-http.t @ 29564:db565a506729

test-http: use sed instead of fixed-with cut for reading access.log Some systems (like FreeBSD jails) use something other than 127.0.0.1 for localhost, and it's not safe to assume it'll always be the same width. Using sed with a replacement like this sidesteps the problem.
author Augie Fackler <augie@google.com>
date Fri, 15 Jul 2016 12:39:36 -0400
parents 9dc27a334fb1
children 34a5f6c66bc5
comparison
equal deleted inserted replaced
29563:839380cc3368 29564:db565a506729
223 remote: adding manifests 223 remote: adding manifests
224 remote: adding file changes 224 remote: adding file changes
225 remote: added 1 changesets with 1 changes to 1 files 225 remote: added 1 changesets with 1 changes to 1 files
226 $ hg rollback -q 226 $ hg rollback -q
227 227
228 $ cut -c38- ../access.log 228 $ sed 's/.*] "/"/' < ../access.log
229 "GET /?cmd=capabilities HTTP/1.1" 200 - 229 "GET /?cmd=capabilities HTTP/1.1" 200 -
230 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip 230 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip
231 "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces 231 "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces
232 "GET /?cmd=capabilities HTTP/1.1" 200 - 232 "GET /?cmd=capabilities HTTP/1.1" 200 -
233 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip 233 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip