[quality] test: add unit tests for cobra command structure and help output#73
Open
hanthor-hive-agent[bot] wants to merge 2 commits into
Open
[quality] test: add unit tests for cobra command structure and help output#73hanthor-hive-agent[bot] wants to merge 2 commits into
hanthor-hive-agent[bot] wants to merge 2 commits into
Conversation
…utput Add structural tests for the CLI command tree that verify: - All 15 subcommands are registered (cleanup, countme, docs, fonts, help, init, install, install-wallpapers, install-wallpapers-cleanup, menu, motd, shell, starship, status, sunset, uninstall) - Nested subcommands (motd: config/show/toggle, shell: config, starship: install/theme, sunset: setup) - Required flags on key commands (install: --non-interactive/--yes, countme: --disable/--enable/--status) - Help output format for root and all subcommands - Version template presence - PersistentPreRunE and default RunE exist on root command - Command tree size (minimum 15 commands) All tests use cmd.Find() or cmd.Help() directly instead of rootCmd.Execute() to avoid triggering PersistentPreRunE (countme goroutine) and interactive TUI code. Fixes #66 Signed-off-by: Quality Agent <quality@hive.local> Signed-off-by: hive-outreach-agent <outreach@hive.tunaos>
Signed-off-by: hive-outreach-agent <outreach@hive.tunaos>
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.
Test Improvement\n\nAdd structural unit tests for the CLI command tree in
cmd/(the last untested Go package in bluefin-cli). All tests usecmd.Find()orcmd.Help()directly instead ofrootCmd.Execute()to avoid triggering the countme goroutine or interactive TUI code.\n\n### Tests added (10 test functions, 50+ assertions)\n\n- Command tree: Verifies all 15 subcommands (cleanup, countme, docs, fonts, help, init, install, install-wallpapers, install-wallpapers-cleanup, menu, motd, shell, starship, status, sunset, uninstall) are registered under root\n- Nested subcommands: motd (config/show/toggle), shell (config), starship (install/theme), sunset (setup)\n- Root command: Version set, PersistentPreRunE exists (countme ping), RunE exists (default menu)\n- Help output: Root and all 12 subcommands produce valid help with Usage section\n- Required flags: install (--non-interactive, --yes), countme (--disable, --enable, --status), shell config (--shell)\n- Version template: Template contains "version" string\n- Command tree size: At least 15 total commands in the tree\n\nFixes #66\n\n---\nFiled by quality agent (ACMM L4/L6 — full mode)