fix: Endpoint, Token, Cert Path, and Cert Key Storage for CLI Tool#16
Open
CuboYe wants to merge 3 commits intoPermify:mainfrom
Open
fix: Endpoint, Token, Cert Path, and Cert Key Storage for CLI Tool#16CuboYe wants to merge 3 commits intoPermify:mainfrom
CuboYe wants to merge 3 commits intoPermify:mainfrom
Conversation
Author
|
Hi maintainers — I can add a focused regression test around config persistence for endpoint/token/cert-path/cert-key handling if that helps move this forward.\n\nWould you prefer that as one integration-style CLI test or split into small unit tests per config field? |
…ermify#2) Add comprehensive test coverage for the new Token, CertPath, and CertKey config fields: core/config/config_test.go: - TestCoreConfig_YAMLSerialization: verify all fields survive YAML marshal/unmarshal - TestConfigPersistence_RoundTrip: test Write() then Read() round-trip - TestIsConfigured: ensure validation works with new optional fields - TestLoad: verify new fields load correctly into CliConfig core/client/grpc_test.go: - TestNew_EndpointValidation: verify endpoint fallback to config.PermifyURL - TestNew_TokenCredentials: test token and cert credential handling - TestNew_CertPathWhitespace: ensure whitespace trimming works correctly - TestNew_EmptyStringVsWhitespace: verify empty vs whitespace-only handling All tests use table-driven Go test style and pass without network calls. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Author
|
Added the regression tests as promised — pushed to this branch. New test files:
All tests pass with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #2 by addressing: Endpoint, Token, Cert Path, and Cert Key Storage for CLI Tool.
Root cause
The issue behavior was reproducible and required a targeted code-path fix in this repository.
Changes made
Verification
/claim 2