Skip to content

Isolate CLI resolution tests from live kubeconfig - #216

Merged
daisuke8000 merged 1 commit into
mainfrom
test/isolated-cli-resolution
Oct 12, 2026
Merged

daisuke8000 merged 1 commit into
mainfrom
test/isolated-cli-resolution

Conversation

@daisuke8000

Copy link
Copy Markdown
Owner

概要

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).

@daisuke8000
daisuke8000 merged commit d663cc7 into main Oct 12, 2026
2 checks passed
@daisuke8000
daisuke8000 deleted the test/isolated-cli-resolution branch October 12, 2026 00:21
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.

1 participant