Repository navigation
test: keep the developer's gateway key out of the test environment - #11
Merged
Merged
Conversation
The fixture copied process.env, so an exported AI_GATEWAY_API_KEY made the default gateway Vercel and broke every test expecting the Callstack portal. Drop non-Callstack gateway keys and XDG_DATA_HOME (OpenCode's key store) too.
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.
npm testfailed locally onmain(10 tests) whenAI_GATEWAY_API_KEYis exported. The test fixture starts fromprocess.envand setsCALLSTACK_AUTH_TOKEN, so with both keys presentdefaultProvider()picks Vercel AI Gateway and every test that expects the Callstack portal fails. CI never saw it because it has no keys.XDG_DATA_HOME, so OpenCode's key-store lookup can't reach the developer's realauth.json.npm test: 65/65 pass both with and withoutAI_GATEWAY_API_KEY/XDG_DATA_HOMEset.🤖 Generated with Claude Code