Skip to content

fix: add e2e tests for downloading over WS/WSS/WebTransport - #1097

Draft
aschmahmann wants to merge 7 commits into
mainfrom
fix/e2e-testing
Draft

fix: add e2e tests for downloading over WS/WSS/WebTransport#1097
aschmahmann wants to merge 7 commits into
mainfrom
fix/e2e-testing

Conversation

@aschmahmann

@aschmahmann aschmahmann commented May 28, 2026

Copy link
Copy Markdown
Contributor

Title

fix: add e2e tests for downloading over WS/WSS/WebTransport

Description

There have been regressions related to downloading from WS/WSS/WebTranport addresses. We add tests here to catch them as well as associated fixes.

Notes & open questions

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if necessary (this includes comments as well)
  • I have added tests that prove my fix is effective or that my feature works

Comment thread test-e2e/fixtures/serve/kubo.ts Outdated
Comment thread test-e2e/fixtures/serve/kubo.ts
Comment thread test-e2e/bitswap.test.ts Outdated
Comment thread patches/@helia+block-brokers+5.2.4.patch Outdated
@aschmahmann
aschmahmann force-pushed the fix/e2e-testing branch 2 times, most recently from 4b8565e to 834e01e Compare May 28, 2026 18:51
Comment thread test-e2e/bitswap.test.ts
*/
async function mockRouting (page: any, peerAddrs: string[]): Promise<void> {
await page.route(
`${MAIN_KUBO}/routing/v1/providers/**`,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@achingbrain should we also block the routing/v1/peers endpoint to prevent discovering additional addresses for the peer and circumventing the test or does Helia not do this?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense for a belt & braces approach.

js-libp2p will query the routing if the peer to dial has no known addresses so I think we are ok for now but I think there was some talk about querying if the dial fails.

@aschmahmann
aschmahmann marked this pull request as ready for review May 29, 2026 12:47
- switch mocks from page to page.context
- mock out peer routing in bitswap tests
achingbrain added a commit to ipfs/helia that referenced this pull request May 31, 2026
When a peer has HTTP multiaddrs, ensure that the matching doesn't
eagerly also match WS(S) addresses.

Refs: ipfs/service-worker-gateway#1092
Refs: ipfs/service-worker-gateway#1097
@lidel
lidel marked this pull request as draft June 9, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants