This is an archive of the discontinued Mercurial Phabricator instance.

lfs: remove internal url in test
ClosedPublic

Authored by quark on Jan 11 2018, 12:27 AM.

Details

Summary

test-lfs-test-server.t refers to a FB internal domain and requires certain
implementation (ex. set error code to 404) at that endpoint. Without any
workaround, It should in theory error out like "Domain cannot be resolved".
I don't know how Matt Harbison ran the test.

This patch changes the test to only depend on lfs-test-server.
Unfortunately the logic has to be changed since lfs-test-server does not
set error code to 404 but just removes "download" from "actions".

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

quark created this revision.Jan 11 2018, 12:27 AM

Yeah, I’ve been ignoring this failure. I thought I mentioned it back when this was first brought over. I’m assuming that FB will start using the built in extension and tests soon, and I didn’t want to drop test coverage on you like that. Thanks for fixing it.

hgext/lfs/blobstore.py
239

It looks like we still need the ‘if p’ test.

quark updated this revision to Diff 4845.Jan 16 2018, 1:37 PM
quark added inline comments.Jan 16 2018, 1:38 PM
hgext/lfs/blobstore.py
239

Sorry. I missed the comment. Fixed now.

LGTM, thanks.

Any thoughts on what we should do if 'p' does come up None? It's a clear server error (sending back an oid we didn't ask for).

yuja accepted this revision.Jan 17 2018, 9:30 AM
This revision is now accepted and ready to land.Jan 17 2018, 9:30 AM
This revision was automatically updated to reflect the committed changes.
quark added a comment.Jan 17 2018, 6:00 PM

LGTM, thanks.
Any thoughts on what we should do if 'p' does come up None? It's a clear server error (sending back an oid we didn't ask for).

Not sure. Blame the server somehow?