Documentation
¶
Overview ¶
Package envtest holds tiny, dependency-free helpers shared by TestMain functions across packages. It intentionally imports nothing from this repo so it can be used from internal test files (package foo, not foo_test) without risking an import cycle back into the package under test.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearAmbientGitHubTokenEnv ¶
func ClearAmbientGitHubTokenEnv() (restore func())
ClearAmbientGitHubTokenEnv clears GITHUB_TOKEN/GH_TOKEN for the life of a TestMain run and returns a func to restore their original values afterward. Without this, a developer machine's or CI runner's ambient token can leak into UserPRCache and trigger a real, unmocked dial to the GitHub API mid-test-suite.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.