Skip to content

pkg/cli: Drop command tree snapshot test#473

Queued
timflannagan wants to merge 1 commit intomainfrom
cleanup/remove-cli-command-tree-test
Queued

pkg/cli: Drop command tree snapshot test#473
timflannagan wants to merge 1 commit intomainfrom
cleanup/remove-cli-command-tree-test

Conversation

@timflannagan
Copy link
Copy Markdown
Collaborator

Description

Remove the generated-style pkg/cli/commands_test.go coverage test. The test
snapshotted the full top-level Cobra command list and a few weak command
metadata assertions, which made normal CLI changes brittle without adding a
meaningful compatibility contract. Root command behavior remains covered in
pkg/cli/root_test.go.

Change Type

/kind cleanup

Changelog

NONE

Additional Notes

Verified with go test ./pkg/cli.

The command tree test froze the full top-level CLI surface and a few
subcommand counts without encoding a meaningful compatibility contract. That
made routine CLI evolution require brittle test updates while root behavior
continues to live in root_test.go.

Signed-off-by: timflannagan <timflannagan@gmail.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes the generated-style Cobra command tree snapshot test from pkg/cli, reducing brittleness for routine CLI surface changes while keeping functional root behavior covered by pkg/cli/root_test.go.

Changes:

  • Delete pkg/cli/commands_test.go, which asserted a full top-level command list and some command metadata/flag presence checks.
  • Rely on existing targeted root behavior tests in pkg/cli/root_test.go rather than a command-tree snapshot contract.

@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 4, 2026
@timflannagan timflannagan added this pull request to the merge queue May 4, 2026
Any commits made after this event will not be merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants