Skip to content

test: add keyring backend validation and auth coverage#26

Closed
salmonumbrella wants to merge 3 commits into
openclaw:mainfrom
salmonumbrella:feat/gmail-thread-filtering-v2
Closed

test: add keyring backend validation and auth coverage#26
salmonumbrella wants to merge 3 commits into
openclaw:mainfrom
salmonumbrella:feat/gmail-thread-filtering-v2

Conversation

@salmonumbrella

@salmonumbrella salmonumbrella commented Jan 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add table-driven tests for allowedBackendsFromEnv() covering all backend options (auto, keychain, file, invalid)
  • Add errInvalidKeyringBackend sentinel error for programmatic error checking with errors.Is()
  • Add negative test for keychain access failure in auth flow
  • Fix code formatting alignment in auth.go and store.go

Test Plan

  • All existing tests pass
  • New tests cover empty, auto, keychain, file, invalid, whitespace-trimmed, and case-insensitive inputs
  • Sentinel error allows errors.Is(err, errInvalidKeyringBackend) checks
  • Coverage for internal/secrets improved to 74.7%

🤖 Generated with Claude Code

salmonumbrella and others added 2 commits January 2, 2026 07:02
Adds ensureKeychainAccess check before OAuth flow to fail early when
keychain is locked. Includes test to verify authorizeGoogle is not
called when keychain check fails.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add table-driven tests for allowedBackendsFromEnv()
- Add errInvalidKeyringBackend sentinel for testable error checking
- Fix formatting alignment in auth.go and store.go

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@salmonumbrella salmonumbrella changed the title feat(gmail): add message filtering flags for thread display test: add keyring backend validation and auth coverage Jan 2, 2026
Add blank lines before if/return statements per whitespace linter rules.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@steipete

steipete commented Jan 7, 2026

Copy link
Copy Markdown
Collaborator

Landed on via bf0b75a (fix(secrets): normalize keyring backend values). Thanks @salmonumbrella!

@steipete steipete closed this Jan 7, 2026
@steipete

steipete commented Jan 7, 2026

Copy link
Copy Markdown
Collaborator

Landed on main via bf0b75a (fix(secrets): normalize keyring backend values). Thanks @salmonumbrella!

manascb1344 pushed a commit to manascb1344/gogcli that referenced this pull request Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants