mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00:00
Add comprehensive test suite for all Cobra CLI commands in cmd/cli/commands_test.go. The test suite includes: - Basic command structure validation - Service command creation and subcommand testing - Help and version command functionality - Error handling for invalid flags - Flag validation (verbose, silent) - Command execution and argument handling - Subcommand validation Key features: - Uses sync.Once for thread-safe CLI initialization - Tests the actual global rootCmd instead of isolated instances - Provides realistic test coverage of the application's command structure - All tests pass and project builds successfully