From 50b6f0809cd6a65f40b1c62e1773670d7477054c Mon Sep 17 00:00:00 2001 From: "Stanko K.R." Date: Wed, 26 Aug 2026 13:25:56 +0200 Subject: [PATCH] Keep the silent sign-in test out of the developer's keyring TestSetupSilentSuccessKeepsSignInInstructions stubs the interactive login and asserts its instructions surface, but auth.NewManager consulted the real system keyring first. On a machine where the developer is signed in to HEY the wizard skips the stubbed login and the test fails; in CI, with no keyring, it passes. HEY_NO_KEYRING=1 confines it to its temp dir like every other auth-touching test. --- internal/cmd/setup_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/cmd/setup_test.go b/internal/cmd/setup_test.go index 510e1291..898d4f59 100644 --- a/internal/cmd/setup_test.go +++ b/internal/cmd/setup_test.go @@ -172,6 +172,9 @@ func TestSetupSilentSuccessShowsSpinnerAndCompletion(t *testing.T) { func TestSetupSilentSuccessKeepsSignInInstructions(t *testing.T) { stubStdinTerminal(t) t.Setenv("HEY_NONINTERACTIVE", "") + // Without this the manager consults the developer's real keyring, sees them + // signed in, and skips the stubbed login this test exists to observe. + t.Setenv("HEY_NO_KEYRING", "1") previousAuthMgr := authMgr authMgr = auth.NewManager("http://app.hey.localhost:3003", http.DefaultClient, t.TempDir()) t.Cleanup(func() { authMgr = previousAuthMgr })