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
@@ -1,6 +1,6 @@
import { existsSync, readdirSync, readFileSync } from "node:fs";
import { extname, join } from "node:path";
import { TOOL_BUNDLE_MAP, TOOLS } from "@snapotter/shared";
import { apiToolPath, TOOL_BUNDLE_MAP, TOOLS } from "@snapotter/shared";
import { afterAll, beforeAll, describe, expect, it } from "vitest";
import { defaultSettingsFor } from "../helpers/tool-default-settings.js";
import { buildTestApp, createMultipartPayload, loginAsAdmin, type TestApp } from "./test-server.js";
@@ -211,7 +211,7 @@ describe("multi-modality tool x format matrix", () => {
const { body, contentType } = createMultipartPayload(fields);
const res = await testApp.app.inject({
method: "POST",
url: `/api/v1/tools/${toolId}`,
url: apiToolPath(toolId),
headers: { authorization: `Bearer ${adminToken}`, "content-type": contentType },
body,
});