aboutsummaryrefslogtreecommitdiff
path: root/tool/aio.py
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-11-28 13:13:27 +0800
committercrupest <crupest@outlook.com>2022-11-28 13:13:27 +0800
commit51bee1e8891ebea829a1a5e9a6502a79e0e5b6db (patch)
tree63b194129d445220ce11425cc993fca67788e9ad /tool/aio.py
parent873c9b4e39e47d2e6e1dbf40ee6f2e812c229adb (diff)
downloadcrupest-51bee1e8891ebea829a1a5e9a6502a79e0e5b6db.tar.gz
crupest-51bee1e8891ebea829a1a5e9a6502a79e0e5b6db.tar.bz2
crupest-51bee1e8891ebea829a1a5e9a6502a79e0e5b6db.zip
Merge test into aio.
Diffstat (limited to 'tool/aio.py')
-rwxr-xr-xtool/aio.py11
1 files changed, 11 insertions, 0 deletions
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...")