mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
test(api): section-prefix tool URLs across integration, docker, and e2e api specs
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
import { readFileSync } from "node:fs";
|
||||
import { join } from "node:path";
|
||||
import { apiToolPath } from "@snapotter/shared";
|
||||
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
||||
import { buildTestApp, createMultipartPayload, loginAsAdmin, type TestApp } from "./test-server.js";
|
||||
|
||||
@@ -47,7 +48,7 @@ function buildToolRequest(
|
||||
]);
|
||||
return {
|
||||
method: "POST" as const,
|
||||
url: `/api/v1/tools/${toolId}`,
|
||||
url: apiToolPath(toolId),
|
||||
headers: { "content-type": contentType, authorization: `Bearer ${adminToken}` },
|
||||
body,
|
||||
};
|
||||
@@ -312,7 +313,7 @@ describe("Simultaneous batch + single requests — no corruption", () => {
|
||||
const [batchRes, singleRes] = await Promise.all([
|
||||
app.inject({
|
||||
method: "POST",
|
||||
url: "/api/v1/tools/resize/batch",
|
||||
url: "/api/v1/tools/image/resize/batch",
|
||||
headers: {
|
||||
"content-type": batchPayload.contentType,
|
||||
authorization: `Bearer ${adminToken}`,
|
||||
@@ -343,7 +344,7 @@ describe("Simultaneous batch + single requests — no corruption", () => {
|
||||
const [batchRes, rotateRes] = await Promise.all([
|
||||
app.inject({
|
||||
method: "POST",
|
||||
url: "/api/v1/tools/compress/batch",
|
||||
url: "/api/v1/tools/image/compress/batch",
|
||||
headers: {
|
||||
"content-type": batchPayload.contentType,
|
||||
authorization: `Bearer ${adminToken}`,
|
||||
|
||||
Reference in New Issue
Block a user