credentials package and resolveToken lack unit tests #593
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thwap/thwap-pagesd#593
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
internal/tpagectl/credentialshas no tests; the keychain store is only exercised indirectly viafakeStorein the auth/token test packages.resolveTokenincmd/tpagectl/main.goalso has no direct coverage (main_test only checks help output).Consider testing the store against a keyring backend that works headless (e.g. keyring's
file/memory backend) and table-driven tests forresolveTokenprecedence (config wins, keychain fallback, error paths).See #588
Fixed in #635: table-driven
TestResolveTokencovers config-wins, keychain fallback, empty,ErrUnavailable,ErrNotFound, and genuine-error propagation. Thecredentialspackage already had unit tests (credentials_test.go: opener sentinels, Set/Get/Delete, genuine-failure propagation) from the #588 pass.