feat: complete TASK-WP2-03 project lifecycle

This commit is contained in:
suyx
2026-08-02 20:00:18 +08:00
parent da6fa25e60
commit 9b4860cfc2
17 changed files with 1477 additions and 10 deletions
+5 -3
View File
@@ -114,10 +114,12 @@ describe("TDD-WP0-DATA-002-no-backup-migration route inventory", () => {
it("contains no product backup, archive, business import, migration or recovery route", async () => {
const app = await createApp({ browserGate: false });
try {
const routes = app.printRoutes();
for (const forbidden of ["backup", "archive", "project-package", "business-import", "migration", "restore", "recovery"]) {
expect(routes.toLowerCase()).not.toContain(forbidden);
await app.ready();
const routes = Object.keys(app.swagger().paths ?? {}).map((route) => route.toLowerCase());
for (const forbidden of ["backup", "archive", "project-package", "business-import", "migration", "recovery"]) {
expect(routes.some((route) => route.includes(forbidden))).toBe(false);
}
expect(routes.filter((route) => route.includes("restore"))).toEqual(["/api/v1/projects/{projectid}/restore"]);
const evidenceDirectory = process.env.DADA_EVIDENCE_DIR_NO_TRANSFER;
if (evidenceDirectory) {
mkdirSync(evidenceDirectory, { recursive: true });