Repository navigation
Isolate CLI resolution tests from live kubeconfig - #216
Merged
Merged
Conversation
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.
概要
Replace two CLI blackbox tests that could use the developer's kubeconfig and contact a cluster with deterministic CLI validation and run-resolution coverage. The existing implicit-query unit test now covers label and field selectors with both all namespaces and an explicit namespace, asserting the query, namespace scope, and implicit-query diagnostic.
The test supplies a nonexistent explicit kubeconfig, proving that these namespace scopes resolve without reading it. Remaining blackbox cases exit during help/version handling, argument parsing, or validation before cluster construction. Production behavior is unchanged.
変更理由
The removed tests expected an arbitrary runtime failure after resolution, so a working kubeconfig could make them contact a live cluster or hang. Direct output assertions preserve the intended regression coverage without requiring that failure.
Validation on Rust 1.89.0: format, cargo audit, locked workspace build, and all-target clippy passed. CLI unit and integration tests passed, and the full workspace suite passed with KUBECONFIG pointing at a nonexistent file (288 passed, one ignored doc test).