Patchwork tests: add HTTP POST and PUT support to the $LOGDATE$ substitution

login
register
mail settings
Submitter Matt Harbison
Date Feb. 24, 2018, 3:02 a.m.
Message ID <14510712ffab7d3b779f.1519441330@Envy>
Download mbox | patch
Permalink /patch/28301/
State Accepted
Headers show

Comments

Matt Harbison - Feb. 24, 2018, 3:02 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# 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).
Yuya Nishihara - Feb. 24, 2018, 5:05 a.m.
On Fri, 23 Feb 2018 22:02:10 -0500, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # 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.

Patch

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)