Skip to content

refactor items#157

Open
wesleymccollam wants to merge 4 commits intomainfrom
refactor-items
Open

refactor items#157
wesleymccollam wants to merge 4 commits intomainfrom
refactor-items

Conversation

@wesleymccollam
Copy link
Contributor

@wesleymccollam wesleymccollam commented Feb 10, 2026

Change Description

  • reduce AuthStorageOption duplication
  • refactor the StorageLocation to enum
  • add missing error handling for some GetOptionValue lines
  • Remove duplicated code in PerformXLogin methods within internal/commands/auth/credentials.go

Change Characteristics

  • This PR contains beta functionality
  • This PR requires introduction of breaking changes

Checklist

All full (or complete) PRs that need review prior to merge should have the following box checked.

If contributing a partial or incomplete change (expecting the development team to complete the remaining work) please leave the box unchecked

  • Check to confirm: I have performed a review of my PR against the PR checklist and confirm that:
    • Changes have proper unit and acceptance test coverage (including regression tests)
    • Impacted command, parameter and flag descriptions have been reviewed and updated
    • Impacted command examples have been reviewed and updated
    • Impacted documentation files have been reviewed and updated
    • Does not introduce breaking changes to commands, parameters or flags (unless required to do so)
    • I am aware that changes to generated code may not be merged

Required SDK Upgrades

Testing

This PR has been tested with:

  • Unit tests (please paste commands and results below)
  • Acceptance tests (please paste commands and results below)
  • End-to-end tests (please paste the link to the actions workflow runs)
  • Not applicable (no evidences needed)

Shell Command(s)

go test -v ./internal/commands/auth/... -run "^(TestSaveTokenForMethod_FallsBackToFileWhenKeychainSaveFails|TestSaveTokenForMethod_UsesKeychainWhenAvailable|TestSaveTokenForMethod_StorageTypeNone|TestSaveTokenForMethod_WithKeychainDisabled|TestSaveTokenForMethod_WithKeychainEnabled|TestShouldUseKeychain_Default|TestSaveTokenForMethod_FileStorageFallback|TestEnvironmentVariable_FileStorage)" --count=1

Testing Results

Expand Results
=== RUN   TestSaveTokenForMethod_FallsBackToFileWhenKeychainSaveFails
--- PASS: TestSaveTokenForMethod_FallsBackToFileWhenKeychainSaveFails (0.00s)
=== RUN   TestSaveTokenForMethod_UsesKeychainWhenAvailable
--- PASS: TestSaveTokenForMethod_UsesKeychainWhenAvailable (0.00s)
=== RUN   TestSaveTokenForMethod_WithKeychainDisabled
--- PASS: TestSaveTokenForMethod_WithKeychainDisabled (0.00s)
=== RUN   TestSaveTokenForMethod_WithKeychainEnabled
    use_keychain_test.go:86: Token saved to: keychain
--- PASS: TestSaveTokenForMethod_WithKeychainEnabled (0.11s)
=== RUN   TestShouldUseKeychain_Default
    use_keychain_test.go:226: Token saved with default settings to: keychain
--- PASS: TestShouldUseKeychain_Default (0.12s)
=== RUN   TestSaveTokenForMethod_FileStorageFallback
    use_keychain_test.go:346: Token saved - fallback test to: keychain
--- PASS: TestSaveTokenForMethod_FileStorageFallback (0.12s)
=== RUN   TestEnvironmentVariable_FileStorage
--- PASS: TestEnvironmentVariable_FileStorage (0.00s)
=== RUN   TestSaveTokenForMethod_StorageTypeNone
--- PASS: TestSaveTokenForMethod_StorageTypeNone (0.00s)
PASS
ok  	github.com/pingidentity/pingcli/internal/commands/auth	0.702s

… enum, add missing error handling for some GetOptionValue lines
@wesleymccollam wesleymccollam requested a review from a team as a code owner February 10, 2026 21:00
@patrickcping
Copy link
Contributor

@PingDavidR there seems to be a different changelog process between this repo and the PingOne Terraform repo - is this intended?

…lue errors, add missing fallback for file storage checking, comment lines corrected
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.

3 participants