Repository navigation
test(socks): use api.apify.com/v2/browser-info instead of example.com - #740
Merged
Merged
Conversation
The SOCKS e2e tests were the only ones depending on example.com, which is unreachable in sandbox environments with limited network access. Point them at api.apify.com/v2/browser-info, a token-free endpoint that echoes the request as JSON, and assert on its stable `clientIp` field. Closes #739 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UdrrE9esQwinTor1P7eJso
VojtaM39
approved these changes
Nov 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #739
What
The three SOCKS e2e tests in
test/e2e/socks.tsnow fetchhttps://api.apify.com/v2/browser-infoinstead ofhttps://example.com, and assert on itsclientIpfield instead ofExample Domain.Why
To let the e2e tests run in sandbox environments with limited network access.
example.comis blocked there, so these three tests failed during the TLS handshake even though the SOCKS code works.How
api.apify.com/v2/browser-infois a public, token-free endpoint that returns a small JSON echo of the request. Its field names are stable, which makesclientIpa safe thing to assert on. It's reachable from CI, local machines and the restricted sandbox.Test-only change. No
src/changes and no version bump.Verification
In the Docker test image (
test/Dockerfile), on a network with restricted outbound access:eslint .: cleanpnpm run type-check: cleanvitest run --project e2e test/e2e/socks.ts: 3/3 passedpnpm run test:e2e: 10/10 files, 2210/2210 tests passed (before this change: 2207/2210, with these 3 failing)Risk
The tests still need internet access, now to
api.apify.cominstead ofexample.com. Moving them to the localTargetServerwould remove that dependency and could be a follow-up.Generated by Claude Code