From 51bee1e8891ebea829a1a5e9a6502a79e0e5b6db Mon Sep 17 00:00:00 2001 From: crupest Date: Mon, 28 Nov 2022 13:13:27 +0800 Subject: Merge test into aio. --- tool/aio.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tool/aio.py') diff --git a/tool/aio.py b/tool/aio.py index 9a7ab33..e2a9f13 100755 --- a/tool/aio.py +++ b/tool/aio.py @@ -25,6 +25,7 @@ from modules.check import * from modules.backup import * from modules.download_tools import * from modules.helper import * +from modules.test import * console = Console() @@ -103,6 +104,10 @@ docker_subparsers.add_parser("down", help="Run docker compose down.") docker_subparsers.add_parser( "prune", help="Run docker system prune -a -f.") +test_parser = subparsers.add_parser("test", help="Test things.") +test_parser.add_argument( + "test_action", help="Test action.", choices=["crupest-api"]) + args = parser.parse_args() if args.yes: @@ -468,6 +473,12 @@ def run(): "To renew certs previously created (nginx):", style="cyan") console.print(certbot_command_gen( domain, 'renew', test=is_test), soft_wrap=True) + case "test": + match args.test_action: + case "crupest-api": + test_crupest_api(console) + case _: + console.print("Test action invalid.", style="red") case _: console.print("First let's check all the templates...") -- cgit v1.2.3