Mercurial > hg
changeset 52087:888e00b2c3ee stable
test-lfs-serve-access: vastly simplify the error output check
The traceback differences between all supported Python versions is about to
become insane to handle, so let's check what we're actually looking to check.
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Thu, 24 Oct 2024 18:04:26 +0200 |
parents | fb15ba66c702 |
children | 51057ab0dffa |
files | tests/test-lfs-serve-access.t |
diffstat | 1 files changed, 2 insertions(+), 53 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-lfs-serve-access.t Sun Mar 31 17:57:46 2024 -0300 +++ b/tests/test-lfs-serve-access.t Thu Oct 24 18:04:26 2024 +0200 @@ -337,61 +337,10 @@ $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d HTTP/1.1" 422 - (glob) - $ grep -v ' File "' $TESTTMP/errors.log - $LOCALIP - - [$ERRDATE$] HG error: Exception happened while processing request '/.git/info/lfs/objects/batch': (glob) - $LOCALIP - - [$ERRDATE$] HG error: Traceback (most recent call last): (glob) - $LOCALIP - - [$ERRDATE$] HG error: verifies = store.verify(oid) (glob) - $LOCALIP - - [$ERRDATE$] HG error: ^^^^^^^^^^^^^^^^^ (glob) (py311 !) - $LOCALIP - - [$ERRDATE$] HG error: raise IOError(errno.EIO, r'%s: I/O error' % oid.decode("utf-8")) (glob) - $LOCALIP - - [$ERRDATE$] HG error: *Error: [Errno *] f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e: I/O error (glob) - $LOCALIP - - [$ERRDATE$] HG error: (glob) - $LOCALIP - - [$ERRDATE$] HG error: Exception happened while processing request '/.git/info/lfs/objects/batch': (glob) - $LOCALIP - - [$ERRDATE$] HG error: Traceback (most recent call last): (glob) - $LOCALIP - - [$ERRDATE$] HG error: verifies = store.verify(oid) (glob) - $LOCALIP - - [$ERRDATE$] HG error: ^^^^^^^^^^^^^^^^^ (glob) (py311 !) - $LOCALIP - - [$ERRDATE$] HG error: raise IOError(errno.EIO, r'%s: I/O error' % oid.decode("utf-8")) (glob) - $LOCALIP - - [$ERRDATE$] HG error: *Error: [Errno *] b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c: I/O error (glob) - $LOCALIP - - [$ERRDATE$] HG error: (glob) - $LOCALIP - - [$ERRDATE$] HG error: Exception happened while processing request '/.hg/lfs/objects/b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c': (glob) - $LOCALIP - - [$ERRDATE$] HG error: Traceback (most recent call last): (glob) - $LOCALIP - - [$ERRDATE$] HG error: localstore.download(oid, req.bodyfh, req.headers[b'Content-Length']) - $LOCALIP - - [$ERRDATE$] HG error: super(badstore, self).download(oid, src, contentlength) - $LOCALIP - - [$ERRDATE$] HG error: raise LfsCorruptionError( (glob) (py38 !) - $LOCALIP - - [$ERRDATE$] HG error: _(b'corrupt remote lfs object: %s') % oid (glob) (no-py38 !) + $ grep 'hgext.lfs.blobstore.LfsCorruptionError' $TESTTMP/errors.log $LOCALIP - - [$ERRDATE$] HG error: hgext.lfs.blobstore.LfsCorruptionError: corrupt remote lfs object: b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c (glob) - $LOCALIP - - [$ERRDATE$] HG error: (glob) - $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d': (glob) - Traceback (most recent call last): - self.do_write() - self.do_hgweb() - for chunk in self.server.application(env, self._start_response): - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (py312 !) - for r in self._runwsgi(req, res, repo): - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (py311 !) - handled = wireprotoserver.handlewsgirequest( (py38 !) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (py311 !) - return _processbasictransfer( (py38 !) - ^^^^^^^^^^^^^^^^^^^^^^ (py311 !) - rctx, req, res, self.check_perm (no-py38 !) - rctx.repo, req, res, lambda perm: checkperm(rctx, req, perm) (no-py38 !) - res.setbodybytes(localstore.read(oid)) - ^^^^^^^^^^^^^^^^^^^^ (py311 !) - blob = self._read(self.vfs, oid, verify) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (py311 !) - raise IOError(errno.EIO, r'%s: I/O error' % oid.decode("utf-8")) - *Error: [Errno *] 276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d: I/O error (glob) - - $LOCALIP - - [$ERRDATE$] HG error: Exception happened while processing request '/.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d': (glob) - $LOCALIP - - [$ERRDATE$] HG error: Traceback (most recent call last): (glob) - $LOCALIP - - [$ERRDATE$] HG error: res.setbodybytes(localstore.read(oid)) (glob) - $LOCALIP - - [$ERRDATE$] HG error: ^^^^^^^^^^^^^^^^^^^^ (glob) (py311 !) - $LOCALIP - - [$ERRDATE$] HG error: blob = self._read(self.vfs, oid, verify) (glob) - $LOCALIP - - [$ERRDATE$] HG error: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (glob) (py311 !) - $LOCALIP - - [$ERRDATE$] HG error: blobstore._verify(oid, b'dummy content') (glob) - $LOCALIP - - [$ERRDATE$] HG error: raise LfsCorruptionError( (glob) (py38 !) - $LOCALIP - - [$ERRDATE$] HG error: hint=_(b'run hg verify'), (glob) (no-py38 !) $LOCALIP - - [$ERRDATE$] HG error: hgext.lfs.blobstore.LfsCorruptionError: detected corrupt lfs object: 276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d (glob) - $LOCALIP - - [$ERRDATE$] HG error: (glob) + Basic Authorization headers are returned by the Batch API, and sent back with the GET/PUT request.