subcommand review

Some commands have been moved to another group and thus having another
default name (old subcommands are still available...for now):

* daemon -> repo-daemon
* key-import -> service-key-import
* repo-clean -> service-clean
* repo-config -> service-config
* repo-config-validate -> service-config-validate
* repo-setup -> service-setup
* repo-shell -> service-shell
* version -> help-version
This commit is contained in:
2023-01-10 19:42:03 +02:00
parent 0239fb50b6
commit 77954b988b
15 changed files with 699 additions and 554 deletions

View File

@ -57,7 +57,7 @@ def test_check_unsafe(mocker: MockerFixture) -> None:
must check if command is unsafe
"""
check_mock = mocker.patch("ahriman.application.handlers.Handler.check_if_empty")
UnsafeCommands.check_unsafe("repo-clean", ["repo-clean"], _parser())
UnsafeCommands.check_unsafe("service-clean", ["service-clean"], _parser())
check_mock.assert_called_once_with(True, True)
@ -66,7 +66,7 @@ def test_check_unsafe_safe(mocker: MockerFixture) -> None:
must check if command is safe
"""
check_mock = mocker.patch("ahriman.application.handlers.Handler.check_if_empty")
UnsafeCommands.check_unsafe("package-status", ["repo-clean"], _parser())
UnsafeCommands.check_unsafe("package-status", ["service-clean"], _parser())
check_mock.assert_called_once_with(True, False)