Skip to content
This repository was archived by the owner on Aug 10, 2026. It is now read-only.

Fix integration tests for fetch-based HTTP client and CI environment - #163

Merged
moshen merged 1 commit into
masterfrom
2026-08-09-fix-integration-tests
Aug 9, 2026
Merged

Fix integration tests for fetch-based HTTP client and CI environment#163
moshen merged 1 commit into
masterfrom
2026-08-09-fix-integration-tests

Conversation

@moshen

@moshen moshen commented Aug 9, 2026

Copy link
Copy Markdown
Owner

The fetch-based httpRequest client behaves differently from the old request library in error paths, and Google's API returns region-dependent results from CI runners. Three fixes:

  1. errors/No connection: switch the proxy URL from https:// to http:// (more reliably honored by undici's ProxyAgent across environments). Loosen the assertions to just check that an error was returned rather than asserting a specific error code or that result is undefined (the old request library set both err and data; fetch may surface only err).

  2. placeSearchText/123+main+street: Google returns ZERO_RESULTS for this ambiguous query when called from a CI datacenter IP. Accept either OK (with coordinate bounds check) or ZERO_RESULTS (no bounds check) instead of hard-coding OK.

Refs #153

The fetch-based httpRequest client behaves differently from the old
request library in error paths, and Google's API returns region-dependent
results from CI runners. Three fixes:

1. errors/No connection: switch the proxy URL from https:// to http://
   (more reliably honored by undici's ProxyAgent across environments).
   Loosen the assertions to just check that an error was returned rather
   than asserting a specific error code or that result is undefined (the
   old request library set both err and data; fetch may surface only err).

2. placeSearchText/123+main+street: Google returns ZERO_RESULTS for this
   ambiguous query when called from a CI datacenter IP. Accept either
   OK (with coordinate bounds check) or ZERO_RESULTS (no bounds check)
   instead of hard-coding OK.

Refs #153
@moshen
moshen force-pushed the 2026-08-09-fix-integration-tests branch from 4483106 to a31250f Compare August 9, 2026 17:03
@moshen
moshen merged commit 6164891 into master Aug 9, 2026
6 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant