-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Context
PR #134 added the Routing capability (routing.capnp, src/rpc/routing.rs) and UnixFS.add. The HTTP client layer is covered by integration tests (tests/routing_integration.rs, tests/ipfs_integration.rs), but the Cap'n Proto RPC server layer is untested.
Gaps
RoutingImplRPC server —provide()andfind_providers()insrc/rpc/routing.rsare not exercised through Cap'n Proto serialization.- ProviderSink streaming — the
-> streambackpressure flow (build request, send, await, done) has zero test coverage. This is new Cap'n Proto syntax for us. EpochGuardedUnixFS::add— theaddmethod wired insrc/rpc/membrane.rshas no RPC-level test.
Approach
ipfs::HttpClient is a concrete struct — mocking requires either:
- Refactoring behind a trait (allows unit tests with fake responses), or
- Spinning up a lightweight HTTP test server (e.g.
wiremock) that mimics Kubo endpoints.
Option 1 is cleaner long-term. Option 2 is quicker.
Acceptance
- RPC round-trip test for
RoutingImpl::provide - RPC round-trip test for
RoutingImpl::find_providersexercising ProviderSink streaming - RPC round-trip test for
EpochGuardedUnixFS::add - Epoch guard rejection test for routing methods
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels