mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
fix(tests): section-prefix tool API URLs across overhauled suite
#276's overhauled integration tests + QA sweep scripts hit the old sectionless /api/v1/tools/<id> routes, which 404 after #280 made routes section-prefixed. Ran scripts/rewrite-tool-paths.ts for literal URLs and converted dynamic /api/v1/tools/${id} constructions to apiToolPath(). Negative-test paths (nonexistent/fake tools) intentionally left raw.
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* cannot silently drift when tools are added or removed.
|
||||
*/
|
||||
|
||||
import { TOOLS } from "@snapotter/shared";
|
||||
import { apiToolPath, TOOLS } from "@snapotter/shared";
|
||||
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
||||
import { getRegisteredToolIds } from "../../../apps/api/src/routes/tool-factory.js";
|
||||
import { TOOL_DISPLAY_MODES } from "../../../apps/web/src/lib/tool-display-modes.js";
|
||||
@@ -97,7 +97,7 @@ describe("catalog integrity launch gate", () => {
|
||||
for (const tool of TOOLS) {
|
||||
const res = await testApp.app.inject({
|
||||
method: "POST",
|
||||
url: `/api/v1/tools/${tool.id}`,
|
||||
url: apiToolPath(tool.id),
|
||||
headers: {
|
||||
authorization: `Bearer ${adminToken}`,
|
||||
"content-type": "application/json",
|
||||
|
||||
Reference in New Issue
Block a user