Repository navigation
[test-improver] Improve tests for cmd TLS flags - #16300
Merged
Merged
Conversation
Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported, and the scoped test-only changes improve TLS flag coverage through consolidated cases and stronger registration assertions.
No open issues 🎉
What changed in this PR
This pull request improves TLS CLI flag tests by consolidating repeated validation cases into a table-driven test and strengthening flag registration checks. The changes are test-only and preserve existing package coverage.
Changes:
- Consolidated TLS certificate/key dependency cases into one table-driven test.
- Added coverage for standalone
--tls-caparsing. - Added per-flag assertions verifying registered TLS/HMAC flags use string values.
| File | Description |
|---|---|
| internal/cmd/flags_tls_test.go | Refactors TLS dependency tests into table-driven cases and adds per-flag registration and type assertions. |
Review effort: Lite (auto)
Contributor
Author
🔒 mcpg Read-Only Stress — defaultSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: INCONCLUSIVE Notes:
|
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.
File:
internal/cmd/flags_tls_test.goChanges
RequiredTogethersubtests into one table-driven test.--tls-caalone case, which should be accepted.TestTLSFlagsRegisterednow runs a subtest per flag and asserts each flag's type.Coverage: the
cmdpackage stays at 93.5% before and after. This change is structural, plus one new case.Tests:
go vetis clean,gofmt -lreports nothing, andgo test -count=3 -run TLSFlags ./internal/cmd/passes.