Mercurial > hg
changeset 37477:28e8c5949109
tests: add a substitution pattern for HTTP error log dates
This will make tests with error log content less of a nuisance. I didn't roll
it into to $LOGDATE$ because the regex got long and line wrapped. It didn't
seem worth the obscurity.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sat, 07 Apr 2018 13:10:20 -0400 |
parents | e9dea82ea1f3 |
children | d815b9733ebd |
files | tests/common-pattern.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/common-pattern.py Sun Apr 08 11:55:46 2018 +0900 +++ b/tests/common-pattern.py Sat Apr 07 13:10:20 2018 -0400 @@ -71,10 +71,14 @@ # (replacement patterns) br'$USUAL_BUNDLE2_CAPS_SERVER$' ), - # HTTP log dates + # HTTP access log dates (br' - - \[\d\d/.../2\d\d\d \d\d:\d\d:\d\d] "(GET|PUT|POST)', lambda m: br' - - [$LOGDATE$] "' + m.group(1) ), + # HTTP error log dates + (br' - - \[\d\d/.../2\d\d\d \d\d:\d\d:\d\d] (HG error:|Exception)', + lambda m: br' - - [$ERRDATE$] ' + m.group(1) + ), # HTTP header dates- RFC 1123 (br'([Dd]ate): [A-Za-z]{3}, \d\d [A-Za-z]{3} \d{4} \d\d:\d\d:\d\d GMT', lambda m: br'%s: $HTTP_DATE$' % m.group(1)