FORGE-F008 Add unified testing toolkit for generated projects

This commit is contained in:
rob
2026-11-19 14:15:07 +00:00
parent b9cc14333a
commit 9dc4420373
20 changed files with 883 additions and 5 deletions
+4
View File
@@ -8,7 +8,9 @@ from pathlib import Path
ROOT = Path(__file__).resolve().parent
TOOLKIT = ROOT.parent.parent / "toolkits/testing/scripts"
TOKEN_FILES = (".env.example", "docker-compose.yml", "react/index.html",
".bortstack/testing.json",
"react/src/config/site.js", "react/src/components/Logo/Logo.jsx",
"ops/databases/postgres.env.example", "ops/databases/mysql.env.example",
"ops/databases/mariadb.env.example")
@@ -31,6 +33,8 @@ def generate(name, destination, git_init=False):
try:
shutil.copytree(ROOT / "source", target, symlinks=False, dirs_exist_ok=True)
shutil.copytree(ROOT / "boilerplate", target, dirs_exist_ok=True)
for tool_name in ("testtask.sh", "testrunner.sh", "target.py", "toolkit.py"):
shutil.copy2(TOOLKIT / tool_name, target / "scripts" / tool_name)
values = {"__PROJECT_NAME__": name, "__APP_SLUG__": slug,
"__DATABASE_NAME__": slug.replace("-", "_")}
for relative in TOKEN_FILES: