Re: [PATCH] tests: add HTTP POST and PUT support to the $LOGDATE$ substitution

2018-02-23 Thread Yuya Nishihara
On Fri, 23 Feb 2018 22:02:10 -0500, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison 
> # Date 1519437010 18000
> #  Fri Feb 23 20:50:10 2018 -0500
> # Node ID 14510712ffab7d3b779fe3eeba6b94f003ca10f7
> # Parent  762820292aea1fe3948e05b3ac65f2d448386626
> tests: add HTTP POST and PUT support to the $LOGDATE$ substitution

Queued, thanks.
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


[PATCH] tests: add HTTP POST and PUT support to the $LOGDATE$ substitution

2018-02-23 Thread Matt Harbison
# HG changeset patch
# User Matt Harbison 
# Date 1519437010 18000
#  Fri Feb 23 20:50:10 2018 -0500
# Node ID 14510712ffab7d3b779fe3eeba6b94f003ca10f7
# Parent  762820292aea1fe3948e05b3ac65f2d448386626
tests: add HTTP POST and PUT support to the $LOGDATE$ substitution

The lfs serving code uses both POST and PUT requests (and there's existing
support for POST).

diff --git a/tests/common-pattern.py b/tests/common-pattern.py
--- a/tests/common-pattern.py
+++ b/tests/common-pattern.py
@@ -69,8 +69,8 @@
  br'$USUAL_BUNDLE2_CAPS_SERVER$'
  ),
 # HTTP log dates
-(br' - - \[\d\d/.../2\d\d\d \d\d:\d\d:\d\d] "GET',
- br' - - [$LOGDATE$] "GET'
+(br' - - \[\d\d/.../2\d\d\d \d\d:\d\d:\d\d] "(GET|PUT|POST)',
+ lambda m: br' - - [$LOGDATE$] "' + m.group(1)
 ),
 # Windows has an extra '/' in the following lines that get globbed away:
 #   pushing to file:/*/$TESTTMP/r2 (glob)
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel