mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-07-23 10:49:55 +00:00
add ability to run only speicifed triggers from command line
This commit also restores repo-report and repo-sync subcommands
This commit is contained in:
@ -348,6 +348,24 @@ def test_subparsers_repo_remove_unknown_architecture(parser: argparse.ArgumentPa
|
||||
assert args.architecture == ["x86_64"]
|
||||
|
||||
|
||||
def test_subparsers_repo_report(parser: argparse.ArgumentParser) -> None:
|
||||
"""
|
||||
repo-report command must imply trigger
|
||||
"""
|
||||
args = parser.parse_args(["repo-report"])
|
||||
assert args.trigger == ["ahriman.core.report.ReportTrigger"]
|
||||
|
||||
|
||||
def test_subparsers_repo_report_architecture(parser: argparse.ArgumentParser) -> None:
|
||||
"""
|
||||
repo-report command must correctly parse architecture list
|
||||
"""
|
||||
args = parser.parse_args(["repo-report"])
|
||||
assert args.architecture is None
|
||||
args = parser.parse_args(["-a", "x86_64", "repo-report"])
|
||||
assert args.architecture == ["x86_64"]
|
||||
|
||||
|
||||
def test_subparsers_repo_restore(parser: argparse.ArgumentParser) -> None:
|
||||
"""
|
||||
repo-restore command must imply architecture list, lock, no-report and unsafe
|
||||
@ -436,6 +454,24 @@ def test_subparsers_repo_status_update_option_status(parser: argparse.ArgumentPa
|
||||
assert isinstance(args.status, BuildStatusEnum)
|
||||
|
||||
|
||||
def test_subparsers_repo_sync(parser: argparse.ArgumentParser) -> None:
|
||||
"""
|
||||
repo-sync command must imply trigger
|
||||
"""
|
||||
args = parser.parse_args(["repo-sync"])
|
||||
assert args.trigger == ["ahriman.core.upload.UploadTrigger"]
|
||||
|
||||
|
||||
def test_subparsers_repo_sync_architecture(parser: argparse.ArgumentParser) -> None:
|
||||
"""
|
||||
repo-sync command must correctly parse architecture list
|
||||
"""
|
||||
args = parser.parse_args(["repo-report"])
|
||||
assert args.architecture is None
|
||||
args = parser.parse_args(["-a", "x86_64", "repo-report"])
|
||||
assert args.architecture == ["x86_64"]
|
||||
|
||||
|
||||
def test_subparsers_repo_triggers_architecture(parser: argparse.ArgumentParser) -> None:
|
||||
"""
|
||||
repo-triggers command must correctly parse architecture list
|
||||
|
Reference in New Issue
Block a user