comparison tests/test-lfs-test-server.t @ 37242:67db84842356

lfs: improve the client message when the server signals an object error Two things here. First, the previous message included a snippet of JSON, which tends to be long (and in the case of lfs-test-server, has no error message). Instead, give a concise message where possible, and leave the JSON to a debug output. Second, the server can signal issues other than a missing individual file. This change shows a corrupt file, but I'm debating letting the corrupt file get downloaded, because 1) the error code doesn't really fit, and 2) having it locally makes forensics easier. Maybe need a config knob for that.
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 25 Feb 2018 23:44:02 -0500
parents f51c2780db3a
children 435481393198
comparison
equal deleted inserted replaced
37241:79af9ae46a78 37242:67db84842356
447 Status: 200 (git-server !) 447 Status: 200 (git-server !)
448 Content-Length: 7 (git-server !) 448 Content-Length: 7 (git-server !)
449 Content-Type: text/plain; charset=utf-8 (git-server !) 449 Content-Type: text/plain; charset=utf-8 (git-server !)
450 Date: $HTTP_DATE$ (git-server !) 450 Date: $HTTP_DATE$ (git-server !)
451 abort: corrupt remote lfs object: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (git-server !) 451 abort: corrupt remote lfs object: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (git-server !)
452 abort: LFS server error. Remote object for "c" not found: *! (glob) (hg-server !) 452 abort: LFS server error for "c": Validation error! (hg-server !)
453 [255] 453 [255]
454 454
455 The corrupted blob is not added to the usercache or local store 455 The corrupted blob is not added to the usercache or local store
456 456
457 $ test -f ../repo1/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 457 $ test -f ../repo1/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998
805 "size": 6 805 "size": 6
806 } 806 }
807 ] 807 ]
808 "transfer": "basic" (hg-server !) 808 "transfer": "basic" (hg-server !)
809 } 809 }
810 abort: LFS server error. Remote object for "b" not found:(.*)! (re) 810 abort: LFS server error for "b": The object does not exist!
811 [255] 811 [255]
812 812
813 Check error message when object does not exist: 813 Check error message when object does not exist:
814 814
815 $ cd $TESTTMP 815 $ cd $TESTTMP
916 "size": 6 916 "size": 6
917 } 917 }
918 ] 918 ]
919 "transfer": "basic" (hg-server !) 919 "transfer": "basic" (hg-server !)
920 } 920 }
921 abort: LFS server error. Remote object for "a" not found:(.*)! (re) 921 abort: LFS server error for "a": The object does not exist!
922 [255] 922 [255]
923 923
924 $ $PYTHON $RUNTESTDIR/killdaemons.py $DAEMON_PIDS 924 $ $PYTHON $RUNTESTDIR/killdaemons.py $DAEMON_PIDS