test(core): inject vertex auth transport - #45751
Merged
Merged
Conversation
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.
Why
The OpenAI-compatible Google Vertex auth test replaced process-wide
fetchjust to record the request headers added by the provider hook. That global mutation obscured the test's actual boundary and required restoration around the SDK hook run.What Changes
The test now passes a recording transport through the existing SDK options. The Vertex hook wraps that injected transport, and the test retains the offline
GoogleAuthstub plus assertions for both the generated authorization header and the caller's existing header.Scope
This PR owns only TESTP-01 and tests auth wrapping of an injected transport; it does not claim coverage of the global-fetch fallback. #45704 changes Vertex catalog settings and #45748 changes selector fixtures in the same test file, but both touch distinct hunks and neither is a dependency. The other accepted provider-test residuals remain owned by #45743 and #45748. This test-only cleanup requires no changeset.
Verification
The focused suite passed all 12 tests. Core typecheck, formatting, committed-range diff validation, and the full 39-package push-hook typecheck passed. Scoped lint reported zero errors and only seven pre-existing warnings outside this change.