Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core/corehttp/gateway_test: Externalize test to use shell/unixfs' Add…
…FromReader We don't want to create core -> shell -> core import cycles, so we need to move this test out of the corehttp package before we can safely use AddFromReader. Moving the tests into their own _test package means we need to explicitly import the corehttp package, which in turn means we need to *export* makeHandler (now MakeHandler). Pulling in the shell code also increases the surface area for bugs breaking the test, which was previously only testing the low-level code. Not that I expect many bugs in shell/unixfs's AddFromReader, but it's still nice to rule out a whole API when tracking down issues ;). Personally, it seems simpler to stick to keep using importer.BuildDagFromReader directly from this test, but Juan prefers the external approach taken by this commit [1]. [1]: ipfs#1136 (comment)
- Loading branch information