Skip to content

test(socks): use api.apify.com/v2/browser-info instead of example.com - #740

Merged
bliuchak merged 1 commit into
masterfrom
claude/laughing-cray-fzk047
Nov 9, 2026
Merged

bliuchak merged 1 commit into
masterfrom
claude/laughing-cray-fzk047

Conversation

@bliuchak

@bliuchak bliuchak commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Closes #739

What

The three SOCKS e2e tests in test/e2e/socks.ts now fetch https://api.apify.com/v2/browser-info instead of https://example.com, and assert on its clientIp field instead of Example Domain.

Why

To let the e2e tests run in sandbox environments with limited network access. example.com is blocked there, so these three tests failed during the TLS handshake even though the SOCKS code works.

How

api.apify.com/v2/browser-info is a public, token-free endpoint that returns a small JSON echo of the request. Its field names are stable, which makes clientIp a 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 .: clean
  • pnpm run type-check: clean
  • vitest run --project e2e test/e2e/socks.ts: 3/3 passed
  • pnpm 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.com instead of example.com. Moving them to the local TargetServer would remove that dependency and could be a follow-up.


Generated by Claude Code

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
@apify-service-account apify-service-account added the tested Temporary label used only programatically for some analytics. label Nov 7, 2026
@apify-service-account apify-service-account added the t-unblocking Issues with this label are in the ownership of the unblocking team. label Nov 7, 2026
@bliuchak bliuchak added the enhancement New feature or request. label Nov 7, 2026
@bliuchak
bliuchak merged commit 2fd68e6 into master Nov 9, 2026
12 of 15 checks passed
@bliuchak
bliuchak deleted the claude/laughing-cray-fzk047 branch November 9, 2026 09:35
@bliuchak bliuchak added the validated Issues that are resolved and their solutions fulfill the acceptance criteria. label Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request. t-unblocking Issues with this label are in the ownership of the unblocking team. tested Temporary label used only programatically for some analytics. validated Issues that are resolved and their solutions fulfill the acceptance criteria.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace example.com with api.apify.com/v2/browser-info in the SOCKS e2e tests

4 participants