Files
AstrBot/tests/test_cli_command_aliases.py
Soulter 97f0fd3de3 feat: add CLI commands documentation and service management features
- Updated the VitePress configuration to include links to CLI commands in both English and Chinese.
- Enhanced the AstrBot deployment documentation with instructions for installing it as a system service.
- Created comprehensive CLI commands documentation covering initialization, service management, configuration, and plugin management.
- Added tests for CLI command aliases and service functionalities to ensure proper command registration and behavior.
- Implemented service log management features, including enabling application logging and controlling log visibility.
2026-05-21 23:44:28 +08:00

26 lines
772 B
Python

from click.testing import CliRunner
from astrbot.cli.__main__ import cli
def test_top_level_help_uses_product_command_names():
result = CliRunner().invoke(cli, ["help"])
assert result.exit_code == 0
assert "config" in result.output
assert "plugin" in result.output
assert " conf " not in result.output
assert " plug " not in result.output
def test_legacy_config_and_plugin_aliases_still_work():
runner = CliRunner()
config_result = runner.invoke(cli, ["help", "conf"])
plugin_result = runner.invoke(cli, ["help", "plug"])
assert config_result.exit_code == 0
assert "Configuration management commands" in config_result.output
assert plugin_result.exit_code == 0
assert "Plugin management" in plugin_result.output