Skip to content

test(core): inject vertex auth transport - #45751

Merged
kitlangton merged 2 commits into
v2from
vertex-auth-transport
Aug 28, 2026
Merged

test(core): inject vertex auth transport#45751
kitlangton merged 2 commits into
v2from
vertex-auth-transport

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

Why

The OpenAI-compatible Google Vertex auth test replaced process-wide fetch just 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 GoogleAuth stub 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

cd packages/core
bun run test test/plugin/provider-google-vertex.test.ts
bun typecheck

cd ../..
bun prettier --check packages/core/test/plugin/provider-google-vertex.test.ts
bun oxlint packages/core/test/plugin/provider-google-vertex.test.ts
git diff --check origin/v2...HEAD
git push -u origin vertex-auth-transport

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.

@kitlangton
kitlangton merged commit f2fb191 into v2 Aug 28, 2026
8 checks passed
@kitlangton
kitlangton deleted the vertex-auth-transport branch August 28, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant