test(api): section-prefix tool URLs across integration, docker, and e2e api specs

This commit is contained in:
SnapOtter
2026-06-20 12:24:50 +08:00
parent fc205c7428
commit f80444791b
213 changed files with 2868 additions and 2846 deletions
@@ -18,6 +18,7 @@
import { existsSync, readFileSync } from "node:fs";
import { join } from "node:path";
import { apiToolPath } from "@snapotter/shared";
import sharp from "sharp";
import { afterAll, beforeAll, describe, expect, it } from "vitest";
import { buildTestApp, createMultipartPayload, loginAsAdmin, type TestApp } from "./test-server.js";
@@ -110,7 +111,7 @@ async function callToolWithFile(
return app.inject({
method: "POST",
url: `/api/v1/tools/${toolId}`,
url: apiToolPath(toolId),
headers: {
authorization: `Bearer ${adminToken}`,
"content-type": contentType,
@@ -1267,7 +1268,7 @@ describe("Exotic formats with multi-file tools", () => {
const res = await app.inject({
method: "POST",
url: "/api/v1/tools/compose",
url: "/api/v1/tools/image/compose",
headers: { authorization: `Bearer ${adminToken}`, "content-type": contentType },
body: payload,
});
@@ -1295,7 +1296,7 @@ describe("Exotic formats with multi-file tools", () => {
const res = await app.inject({
method: "POST",
url: "/api/v1/tools/stitch",
url: "/api/v1/tools/image/stitch",
headers: { authorization: `Bearer ${adminToken}`, "content-type": contentType },
body: payload,
});
@@ -1323,7 +1324,7 @@ describe("Exotic formats with multi-file tools", () => {
const res = await app.inject({
method: "POST",
url: "/api/v1/tools/collage",
url: "/api/v1/tools/image/collage",
headers: { authorization: `Bearer ${adminToken}`, "content-type": contentType },
body: payload,
});