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
Conversation
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
force-pushed
the
2026-08-09-fix-integration-tests
branch
from
August 9, 2026 17:03
4483106 to
a31250f
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
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:
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).
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