Patchwork [6,of,6] test-lfs-test-server: add a testcase for `hg serve`

login
register
mail settings
Submitter Yuya Nishihara
Date March 29, 2018, 12:45 p.m.
Message ID <20180329214503.a07eec34857a7620a45d6230@tcha.org>
Download mbox | patch
Permalink /patch/29934/
State New
Headers show

Comments

Yuya Nishihara - March 29, 2018, 12:45 p.m.
On Mon, 19 Mar 2018 00:08:29 -0400, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1521268666 14400
> #      Sat Mar 17 02:37:46 2018 -0400
> # Node ID 9c23ccfd5b210bc5d214e13b2bf26535e73fef78
> # Parent  7901a210c0c3c4a1f84fd21ff6e7c9b29454d6bc
> test-lfs-test-server: add a testcase for `hg serve`

The test didn't pass on my laptop. I have no lfs-test-server installed.
Can you investigate it?

s

ERROR: test-lfs-test-server.t (case hg-server) output changed
!
Skipped test-lfs-test-server.t (case git-server): missing feature: git-lfs test server
Failed test-lfs-test-server.t (case hg-server): output changed
# Ran 1 tests, 1 skipped, 1 failed.
python hash seed: 1064356944
Matt Harbison - March 29, 2018, 1:05 p.m.
> On Mar 29, 2018, at 8:45 AM, Yuya Nishihara <yuya@tcha.org> wrote:
> 
>> On Mon, 19 Mar 2018 00:08:29 -0400, Matt Harbison wrote:
>> # HG changeset patch
>> # User Matt Harbison <matt_harbison@yahoo.com>
>> # Date 1521268666 14400
>> #      Sat Mar 17 02:37:46 2018 -0400
>> # Node ID 9c23ccfd5b210bc5d214e13b2bf26535e73fef78
>> # Parent  7901a210c0c3c4a1f84fd21ff6e7c9b29454d6bc
>> test-lfs-test-server: add a testcase for `hg serve`
> 
> The test didn't pass on my laptop. I have no lfs-test-server installed.
> Can you investigate it?

It looks like this crossed paths with the patch to give the Server header a fixed value.  The per-line conditionalizing tends to fail horribly when other lines don’t match, making it look worse.  I’ll respin this tonight.

Patch

--- /home/yuya/work/hghacks/mercurial-review/tests/test-lfs-test-server.t
+++ /home/yuya/work/hghacks/mercurial-review/tests/test-lfs-test-server.t.hg-server.err
@@ -85,7 +85,9 @@ 
   Content-Length: 350 (hg-server !)
   Content-Type: application/vnd.git-lfs+json
   Date: $HTTP_DATE$
-  Server: BaseHTTP/0.3 Python/2.7.13 (hg-server !)
+            "href": "http://localhost:$HGPORT/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (git-server !)
+  Status: 200 (git-server !)
+  Server: testing stub value
   {
     "objects": [
       {
@@ -95,7 +97,6 @@ 
             "header": {
               "Accept": "application/vnd.git-lfs"
             }
-            "href": "http://localhost:$HGPORT/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (git-server !)
             "href": "http://localhost:$HGPORT/.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (hg-server !)
           }
         }
@@ -106,12 +107,11 @@ 
     "transfer": "basic" (hg-server !)
   }
   lfs: uploading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes)
-  Status: 200 (git-server !)
   Status: 201 (hg-server !)
   Content-Length: 0
   Content-Type: text/plain; charset=utf-8
   Date: $HTTP_DATE$
-  Server: BaseHTTP/0.3 Python/2.7.13 (hg-server !)
+  Server: testing stub value
   lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b
   lfs: uploaded 1 files (12 bytes)
   1 changesets found
@@ -161,7 +161,8 @@ 
   Content-Length: 352 (hg-server !)
   Content-Type: application/vnd.git-lfs+json
   Date: $HTTP_DATE$
-  Server: BaseHTTP/0.3 Python/2.7.13 (hg-server !)
+  Content-Type: text/plain; charset=utf-8 (git-server !)
+  Server: testing stub value
   {
     "objects": [
       {
@@ -183,10 +184,9 @@ 
   lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes)
   Status: 200
   Content-Length: 12
-  Content-Type: text/plain; charset=utf-8 (git-server !)
-  Content-Type: application/octet-stream (hg-server !)
-  Date: $HTTP_DATE$
-  Server: BaseHTTP/0.3 Python/2.7.13 (hg-server !)
+  Content-Type: application/octet-stream (hg-server !)
+  Date: $HTTP_DATE$
+  Server: testing stub value
   lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache
   lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b
    a: remote created -> g
@@ -220,10 +220,6 @@ 
   Content-Length: 755 (hg-server !)
   Content-Type: application/vnd.git-lfs+json
   Date: $HTTP_DATE$
-  Server: BaseHTTP/0.3 Python/2.7.13 (hg-server !)
-  {
-    "objects": [
-      {
         "actions": { (git-server !)
           "download": { (git-server !)
             "expires_at": "$ISO_8601_DATE_TIME$" (git-server !)
@@ -233,6 +229,12 @@ 
             "href": "http://localhost:$HGPORT/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (git-server !)
           } (git-server !)
         } (git-server !)
+  Status: 200 (git-server !)
+  Status: 200 (git-server !)
+  Server: testing stub value
+  {
+    "objects": [
+      {
         "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b"
         "size": 12
       }
@@ -267,20 +269,18 @@ 
   }
   lfs: need to transfer 2 objects (39 bytes)
   lfs: uploading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes)
-  Status: 200 (git-server !)
   Status: 201 (hg-server !)
   Content-Length: 0
   Content-Type: text/plain; charset=utf-8
   Date: $HTTP_DATE$
-  Server: BaseHTTP/0.3 Python/2.7.13 (hg-server !)
+  Server: testing stub value
   lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19
   lfs: uploading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes)
-  Status: 200 (git-server !)
   Status: 201 (hg-server !)
   Content-Length: 0
   Content-Type: text/plain; charset=utf-8
   Date: $HTTP_DATE$
-  Server: BaseHTTP/0.3 Python/2.7.13 (hg-server !)
+  Server: testing stub value
   lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998
   lfs: uploaded 2 files (39 bytes)
   1 changesets found
@@ -332,7 +332,9 @@ 
   Content-Length: 670 (hg-server !)
   Content-Type: application/vnd.git-lfs+json
   Date: $HTTP_DATE$
-  Server: BaseHTTP/0.3 Python/2.7.13 (hg-server !)
+  Content-Type: text/plain; charset=utf-8 (git-server !)
+  Content-Type: text/plain; charset=utf-8 (git-server !)
+  Server: testing stub value
   {
     "objects": [
       {
@@ -368,19 +370,17 @@ 
   lfs: downloading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes)
   Status: 200
   Content-Length: 20
-  Content-Type: text/plain; charset=utf-8 (git-server !)
-  Content-Type: application/octet-stream (hg-server !)
-  Date: $HTTP_DATE$
-  Server: BaseHTTP/0.3 Python/2.7.13 (hg-server !)
+  Content-Type: application/octet-stream (hg-server !)
+  Date: $HTTP_DATE$
+  Server: testing stub value
   lfs: adding 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 to the usercache
   lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19
   lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes)
   Status: 200
   Content-Length: 19
-  Content-Type: text/plain; charset=utf-8 (git-server !)
-  Content-Type: application/octet-stream (hg-server !)
-  Date: $HTTP_DATE$
-  Server: BaseHTTP/0.3 Python/2.7.13 (hg-server !)
+  Content-Type: application/octet-stream (hg-server !)
+  Date: $HTTP_DATE$
+  Server: testing stub value
   lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache
   lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998
    b: remote created -> g
@@ -421,10 +421,6 @@ 
   Content-Length: 183 (hg-server !)
   Content-Type: application/vnd.git-lfs+json
   Date: $HTTP_DATE$
-  Server: BaseHTTP/0.3 Python/2.7.13 (hg-server !)
-  {
-    "objects": [
-      {
         "actions": { (git-server !)
           "download": { (git-server !)
             "expires_at": "$ISO_8601_DATE_TIME$" (git-server !)
@@ -433,6 +429,16 @@ 
             } (git-server !)
             "href": "http://localhost:$HGPORT/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (git-server !)
           } (git-server !)
+  lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) (git-server !)
+  Status: 200 (git-server !)
+  Content-Length: 7 (git-server !)
+  Content-Type: text/plain; charset=utf-8 (git-server !)
+  Date: $HTTP_DATE$ (git-server !)
+  abort: corrupt remote lfs object: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (git-server !)
+  Server: testing stub value
+  {
+    "objects": [
+      {
         "error": { (hg-server !)
           "code": 422 (hg-server !)
           "message": "The object is corrupt" (hg-server !)
@@ -443,12 +449,6 @@ 
     ]
     "transfer": "basic" (hg-server !)
   }
-  lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) (git-server !)
-  Status: 200 (git-server !)
-  Content-Length: 7 (git-server !)
-  Content-Type: text/plain; charset=utf-8 (git-server !)
-  Date: $HTTP_DATE$ (git-server !)
-  abort: corrupt remote lfs object: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (git-server !)
   abort: LFS server error. Remote object for "c" not found: *! (glob) (hg-server !)
   [255]
 
@@ -486,7 +486,7 @@ 
   Content-Length: 350 (hg-server !)
   Content-Type: application/vnd.git-lfs+json
   Date: $HTTP_DATE$
-  Server: BaseHTTP/0.3 Python/2.7.13 (hg-server !)
+  Server: testing stub value
   {
     "objects": [
       {
@@ -520,7 +520,10 @@ 
   Content-Length: 988 (hg-server !)
   Content-Type: application/vnd.git-lfs+json
   Date: $HTTP_DATE$
-  Server: BaseHTTP/0.3 Python/2.7.13 (hg-server !)
+  Content-Type: text/plain; charset=utf-8 (git-server !)
+  Content-Type: text/plain; charset=utf-8 (git-server !)
+  Content-Type: text/plain; charset=utf-8 (git-server !)
+  Server: testing stub value
   {
     "objects": [
       {
@@ -569,28 +572,25 @@ 
   lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes)
   Status: 200
   Content-Length: 12
-  Content-Type: text/plain; charset=utf-8 (git-server !)
-  Content-Type: application/octet-stream (hg-server !)
-  Date: $HTTP_DATE$
-  Server: BaseHTTP/0.3 Python/2.7.13 (hg-server !)
+  Content-Type: application/octet-stream (hg-server !)
+  Date: $HTTP_DATE$
+  Server: testing stub value
   lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache
   lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b
   lfs: downloading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes)
   Status: 200
   Content-Length: 20
-  Content-Type: text/plain; charset=utf-8 (git-server !)
-  Content-Type: application/octet-stream (hg-server !)
-  Date: $HTTP_DATE$
-  Server: BaseHTTP/0.3 Python/2.7.13 (hg-server !)
+  Content-Type: application/octet-stream (hg-server !)
+  Date: $HTTP_DATE$
+  Server: testing stub value
   lfs: adding 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 to the usercache
   lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19
   lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes)
   Status: 200
   Content-Length: 19
-  Content-Type: text/plain; charset=utf-8 (git-server !)
-  Content-Type: application/octet-stream (hg-server !)
-  Date: $HTTP_DATE$
-  Server: BaseHTTP/0.3 Python/2.7.13 (hg-server !)
+  Content-Type: application/octet-stream (hg-server !)
+  Date: $HTTP_DATE$
+  Server: testing stub value
   lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache
   lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998
   lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store
@@ -615,7 +615,9 @@ 
   Content-Length: 670 (hg-server !)
   Content-Type: application/vnd.git-lfs+json
   Date: $HTTP_DATE$
-  Server: BaseHTTP/0.3 Python/2.7.13 (hg-server !)
+  Content-Type: text/plain; charset=utf-8 (git-server !)
+  Content-Type: text/plain; charset=utf-8 (git-server !)
+  Server: testing stub value
   {
     "objects": [
       {
@@ -651,19 +653,17 @@ 
   lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes)
   Status: 200
   Content-Length: 12
-  Content-Type: text/plain; charset=utf-8 (git-server !)
-  Content-Type: application/octet-stream (hg-server !)
-  Date: $HTTP_DATE$
-  Server: BaseHTTP/0.3 Python/2.7.13 (hg-server !)
+  Content-Type: application/octet-stream (hg-server !)
+  Date: $HTTP_DATE$
+  Server: testing stub value
   lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache
   lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b
   lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes)
   Status: 200
   Content-Length: 19
-  Content-Type: text/plain; charset=utf-8 (git-server !)
-  Content-Type: application/octet-stream (hg-server !)
-  Date: $HTTP_DATE$
-  Server: BaseHTTP/0.3 Python/2.7.13 (hg-server !)
+  Content-Type: application/octet-stream (hg-server !)
+  Date: $HTTP_DATE$
+  Server: testing stub value
   lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache
   lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998
   lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store
@@ -689,7 +689,10 @@ 
   Content-Length: 988 (hg-server !)
   Content-Type: application/vnd.git-lfs+json
   Date: $HTTP_DATE$
-  Server: BaseHTTP/0.3 Python/2.7.13 (hg-server !)
+  Content-Type: text/plain; charset=utf-8 (git-server !)
+  Content-Type: text/plain; charset=utf-8 (git-server !)
+  Content-Type: text/plain; charset=utf-8 (git-server !)
+  Server: testing stub value
   {
     "objects": [
       {
@@ -738,28 +741,25 @@ 
   lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes)
   Status: 200
   Content-Length: 12
-  Content-Type: text/plain; charset=utf-8 (git-server !)
-  Content-Type: application/octet-stream (hg-server !)
-  Date: $HTTP_DATE$
-  Server: BaseHTTP/0.3 Python/2.7.13 (hg-server !)
+  Content-Type: application/octet-stream (hg-server !)
+  Date: $HTTP_DATE$
+  Server: testing stub value
   lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache
   lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b
   lfs: downloading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes)
   Status: 200
   Content-Length: 20
-  Content-Type: text/plain; charset=utf-8 (git-server !)
-  Content-Type: application/octet-stream (hg-server !)
-  Date: $HTTP_DATE$
-  Server: BaseHTTP/0.3 Python/2.7.13 (hg-server !)
+  Content-Type: application/octet-stream (hg-server !)
+  Date: $HTTP_DATE$
+  Server: testing stub value
   lfs: adding 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 to the usercache
   lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19
   lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes)
   Status: 200
   Content-Length: 19
-  Content-Type: text/plain; charset=utf-8 (git-server !)
-  Content-Type: application/octet-stream (hg-server !)
-  Date: $HTTP_DATE$
-  Server: BaseHTTP/0.3 Python/2.7.13 (hg-server !)
+  Content-Type: application/octet-stream (hg-server !)
+  Date: $HTTP_DATE$
+  Server: testing stub value
   lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache
   lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998
   lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store
@@ -785,10 +785,6 @@ 
   Content-Length: 186 (hg-server !)
   Content-Type: application/vnd.git-lfs+json
   Date: $HTTP_DATE$
-  Server: BaseHTTP/0.3 Python/2.7.13 (hg-server !)
-  {
-    "objects": [
-      {
         "actions": { (git-server !)
           "upload": { (git-server !)
             "expires_at": "$ISO_8601_DATE_TIME$" (git-server !)
@@ -797,6 +793,10 @@ 
             } (git-server !)
             "href": "http://localhost:$HGPORT/objects/8e6ea5f6c066b44a0efa43bcce86aea73f17e6e23f0663df0251e7524e140a13" (git-server !)
           } (git-server !)
+  Server: testing stub value
+  {
+    "objects": [
+      {
         "error": { (hg-server !)
           "code": 404 (hg-server !)
           "message": "The object does not exist" (hg-server !)
@@ -896,10 +896,6 @@ 
   Content-Length: 186 (hg-server !)
   Content-Type: application/vnd.git-lfs+json
   Date: $HTTP_DATE$
-  Server: BaseHTTP/0.3 Python/2.7.13 (hg-server !)
-  {
-    "objects": [
-      {
         "actions": { (git-server !)
           "upload": { (git-server !)
             "expires_at": "$ISO_8601_DATE_TIME$" (git-server !)
@@ -908,6 +904,10 @@ 
             } (git-server !)
             "href": "http://localhost:$HGPORT/objects/bdc26931acfb734b142a8d675f205becf27560dc461f501822de13274fe6fc8a" (git-server !)
           } (git-server !)
+  Server: testing stub value
+  {
+    "objects": [
+      {
         "error": { (hg-server !)
           "code": 404 (hg-server !)
           "message": "The object does not exist" (hg-server !)