Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## feat/http #227 +/- ##
=============================================
+ Coverage 70.66% 71.29% +0.62%
=============================================
Files 64 67 +3
Lines 5543 6072 +529
=============================================
+ Hits 3917 4329 +412
- Misses 1413 1500 +87
- Partials 213 243 +30
|
hannahhoward
left a comment
There was a problem hiding this comment.
After fixing @rvagg 's notes about UnixFS setup (sorry, IPLD is weird), we should test pathing over HTTP too
hannahhoward
left a comment
There was a problem hiding this comment.
After fixing @rvagg 's notes about UnixFS setup (sorry, IPLD is weird), we should test pathing over HTTP too
|
but pathed tests can be in a seperate PR, lower priority. |
| } | ||
| } | ||
|
|
||
| func MockIpfsHandler(ctx context.Context, lsys linking.LinkSystem) func(http.ResponseWriter, *http.Request) { |
There was a problem hiding this comment.
seems like this can be moved in to peerhttpserver.go now?
rvagg
left a comment
There was a problem hiding this comment.
lgtm, I would like to see path tests in there though, they look like they're supported on the server side so it should just mean copying the graphsync ones
5331ef7 to
68fd2be
Compare
* First pass at adapting graphsync to http * fix(http): gracefully handle selector vs path requests * feat(http): extend graphsyncretriever so it can also do http * feat(http): refactor http & graphsync specific pieces to "TransportProtocol" iface * feat(prioritywaitqueue): add InitialPauseDone inspector * feat(http): single peer http retrieval unit test * fix(http): enable http everywhere gs & bs are * chore(http): framework for suite of http unit tests based on bitswap unit test framework * feat(http): remove parallel-request flow, make all serial for now * too-detailed http testing, will remove this in favour of graphsync style testing. * fix(http): better testing framework * fix(http): more test coverage, minor fixes * fix(http): clean up time handling in tests * HTTP CAR validation (#222) * feat(verifiedcar): initial verifiedcar package * feat(verifiedcar): verify http retrievals * chore(verifiedcar): tests for basic error cases * fix(verifiedcar): coverage of more cases, handle known edges properly * fix(verifiedcar): remove extraneous go-routine (#226) Co-authored-by: Rod Vagg <rod@vagg.org> * fix(verifiedcar): address feedback * fix(verifiedcar): fix flaky tests --------- Co-authored-by: Hannah Howard <hannah@hannahhoward.net> * fix(http): refactor MockRoundTripper (#229) * Add HTTP integegration tests (#227) * test: add itests for http * test: add peer http server, minor refactors and fixes * fix(itest): fix compile errors on rebase --------- Co-authored-by: Rod Vagg <rod@vagg.org> Co-authored-by: Hannah Howard <hannah@hannahhoward.net> Co-authored-by: Kyle Huntsman <3432646+kylehuntsman@users.noreply.github.com>
Adds HTTP integration tests that test that Lassie can fetch a valid car over the HTTP protocol. Remote HTTP peers are generated with an http multiaddress and run an HTTP server on that address for serving valid cars.
Notable Changes
itest/testpeer/generator.gocan now generate HTTP peers with an HTTP server that returns valid carsitest/testpeer/mocknet.gohas been updated to add HTTP peersitest/testpeer/peerhttpserver.goto create separate http server instances for each peer, as well as manage start and teardown appropriately.