Restore behavior where 'kumacli monitor' shows the subcommands
This commit is contained in:
@@ -50,13 +50,16 @@ class TestCLIIntegration:
|
||||
mock_args = Mock()
|
||||
mock_args.monitor_action = None
|
||||
|
||||
# Setup parser reference to simulate having called setup_monitor_parser
|
||||
mock_parser = Mock()
|
||||
setup_monitor_parser.parser = mock_parser
|
||||
|
||||
# Execute
|
||||
result = handle_monitor_command(mock_args, mock_client)
|
||||
|
||||
# Verify
|
||||
assert result is False
|
||||
captured = capsys.readouterr()
|
||||
assert "Error: No monitor action specified" in captured.out
|
||||
mock_parser.print_help.assert_called_once()
|
||||
|
||||
def test_maintenance_help_message(self, mock_client, capsys):
|
||||
"""Test maintenance command shows help when no action specified"""
|
||||
@@ -64,13 +67,16 @@ class TestCLIIntegration:
|
||||
mock_args = Mock()
|
||||
mock_args.maintenance_action = None
|
||||
|
||||
# Setup parser reference to simulate having called setup_maintenance_parser
|
||||
mock_parser = Mock()
|
||||
setup_maintenance_parser.parser = mock_parser
|
||||
|
||||
# Execute
|
||||
result = handle_maintenance_command(mock_args, mock_client)
|
||||
|
||||
# Verify
|
||||
assert result is False
|
||||
captured = capsys.readouterr()
|
||||
assert "Error: No maintenance action specified" in captured.out
|
||||
mock_parser.print_help.assert_called_once()
|
||||
|
||||
def test_monitor_command_with_full_args(self, mock_client):
|
||||
"""Test monitor command with complete argument structure"""
|
||||
|
Reference in New Issue
Block a user