Skip to content

Commit b355a29

Browse files
authored
Merge pull request #2367 from dgageot/board/fix-macos-keychain-permission-dialog-in-7f9c6cf8
fix: use in-memory store in keyring tests to avoid macOS keychain permission dialog
2 parents 5bd7746 + 3d53b99 commit b355a29

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

pkg/tools/mcp/tokenstore_keyring_test.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ import (
77
)
88

99
func TestKeyringTokenStore_RoundTrip(t *testing.T) {
10-
// Use in-memory fallback for CI environments without a keyring.
11-
// The KeyringTokenStore constructor already falls back to InMemoryTokenStore,
12-
// so this test validates the interface contract regardless of backend.
13-
store := NewKeyringTokenStore()
10+
// Use in-memory store to avoid triggering macOS keychain permission dialogs
11+
// or failing in CI environments without a keyring.
12+
store := NewInMemoryTokenStore()
1413

1514
resourceURL := "https://example.com/mcp"
1615

@@ -82,7 +81,7 @@ func TestKeyringTokenStore_JSONRoundTrip(t *testing.T) {
8281
}
8382

8483
func TestKeyringTokenStore_RemoveNonExistent(t *testing.T) {
85-
store := NewKeyringTokenStore()
84+
store := NewInMemoryTokenStore()
8685
// Should not error when removing a non-existent token
8786
if err := store.RemoveToken("https://nonexistent.example.com"); err != nil {
8887
t.Fatalf("RemoveToken for non-existent key should not error: %v", err)

0 commit comments

Comments
 (0)