Patchwork D9836: tests: skip a detailed exit status in test-lfs-test-server

login
register
mail settings
Submitter phabricator
Date Jan. 20, 2021, 5:42 a.m.
Message ID <differential-rev-PHID-DREV-rdjdv4azty5z6qx7w5ql-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48147/
State Superseded
Headers show

Comments

phabricator - Jan. 20, 2021, 5:42 a.m.
mharbison72 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  The mode of failure here differs between `lfs-test-server` and `hg serve`, and
  they each throw a different exception.  The `hg serve` case raises a subclass of
  `StorageError`, which gets a detailed status.  The `lfs-test-server` case raises
  a subclass of `Abort`, which does not.  Since the exit code isn't currently
  conditionizable in the tests, this is the simplest way to avoid the failure.

REPOSITORY
  rHG Mercurial

BRANCH
  stable

REVISION DETAIL
  https://phab.mercurial-scm.org/D9836

AFFECTED FILES
  tests/test-lfs-test-server.t

CHANGE DETAILS




To: mharbison72, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/tests/test-lfs-test-server.t b/tests/test-lfs-test-server.t
--- a/tests/test-lfs-test-server.t
+++ b/tests/test-lfs-test-server.t
@@ -420,7 +420,10 @@ 
 
 TODO: give the proper error indication from `hg serve`
 
-  $ hg --repo ../repo1 update -C tip --debug
+TODO: reconsider the except base class so that the git and hg errors yield the
+same exit status.
+
+  $ hg --repo ../repo1 update -C tip --debug --config ui.detailed-exit-code=False
   http auth: user foo, password ***
   resolving manifests
    branchmerge: False, force: True, partial: False
@@ -460,7 +463,7 @@ 
   Date: $HTTP_DATE$ (git-server !)
   abort: corrupt remote lfs object: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (git-server !)
   abort: LFS server error for "c": Validation error (hg-server !)
-  [50]
+  [255]
 
 The corrupted blob is not added to the usercache or local store