commands: add pmbootstrap test (MR 2252)

This is to serve as a place to dump useful internal tests, starting with
one that simply parses all available APKINDEX files.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
Caleb Connolly 2024-06-12 21:07:49 +02:00 committed by Oliver Smith
parent efce73df2f
commit 62d700c3d8
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
4 changed files with 46 additions and 0 deletions

View file

@ -13,6 +13,7 @@ from .log import Log
from .index import Index
from .repo_bootstrap import RepoBootstrap
from .shutdown import Shutdown
from .test import Test
"""New way to model pmbootstrap subcommands that can be invoked without PmbArgs."""
@ -68,6 +69,8 @@ def run_command(args: PmbArgs):
command = RepoBootstrap(args.arch, args.repository)
elif args.action == "shutdown":
command = Shutdown()
elif args.action == "test":
command = Test(args.action_test)
else:
raise NotImplementedError(f"Command '{args.action}' is not implemented.")