Repository navigation
fix(tests): keep the test suite out of the user's Keychain - #309
Merged
adefreitas merged 1 commit intoDec 3, 2026
Merged
Conversation
The GitHub login check in PanelNav read the real Keychain item, so every local test run, with a freshly built test binary macOS doesn't know, asked the user for their password. PanelNav now reads the GitHub and Slack tokens through injectable readers, and the gh-login tests stub them. GitHubAuth.token and SlackCredentials.botToken stop the run when STACKNUDGE_TESTS_NO_KEYCHAIN is set, which make test, make test-without-xcode and CI now set, so a test that reaches the Keychain again fails instead of prompting. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
adefreitas
force-pushed
the
fix/tests-stay-out-of-keychain
branch
from
December 3, 2026 10:59
0d1cef6 to
7b89501
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 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.
This PR stops the test suite from asking for your login password.
PanelNav's GitHub login check calledGitHubAuth.token(), which reads StackNudge's item in the Keychain. Every local test run builds a new test binary that macOS doesn't recognise, so threeIntegrationPageTestsmade macOS ask for the user's password before handing the item over.PanelNavnow reads the GitHub and Slack tokens through injectable readers,githubTokenandslackBotToken, which default to the Keychain. The gh-login tests stubgithubToken.GitHubAuth.tokenandSlackCredentials.botTokenstop the run with a precondition whenSTACKNUDGE_TESTS_NO_KEYCHAINis set.make test,make test-without-xcodeand the CIswift teststep set it, so a test that reaches the Keychain again fails instead of prompting.Checks
make test-without-xcodepasses with the guard on: 2147 tests, 0 failures.IntegrationPageTests, which is how I found the three tests. After it, no test reaches the Keychain.🤖 Generated with Claude Code