fix uploading and more RBAC refinements for auto deploy

This commit is contained in:
KingKDot
2026-06-10 23:50:38 -05:00
parent c14d143a70
commit a1fd780caa
15 changed files with 701 additions and 154 deletions
@@ -124,8 +124,11 @@ describe("file upload route flow", () => {
expect(stageJson.ok).toBe(true);
expect(stageJson.size).toBe(payload.length);
expect(typeof stageJson.pullUrl).toBe("string");
expect(stageJson.pullUrl.startsWith("/api/file/upload/pull/")).toBe(true);
expect(stageJson.agentNotified).toBe(false);
expect(stageJson.agentCommandId).toBeNull();
const pullUrl = new URL(stageJson.pullUrl);
const pullUrl = new URL(stageJson.pullUrl, "https://localhost");
const pullRes = await handleFileDownloadRoutes(
new Request(pullUrl, {
method: "GET",
@@ -228,7 +231,7 @@ describe("file upload route flow", () => {
);
const stageJson = await stageRes!.json() as any;
const pullUrl = new URL(stageJson.pullUrl);
const pullUrl = new URL(stageJson.pullUrl, "https://localhost");
const badPullRes = await handleFileDownloadRoutes(
new Request(pullUrl, {
method: "GET",
@@ -309,7 +312,7 @@ describe("file upload route flow", () => {
deps,
);
const stageJson = await stageRes!.json() as any;
const pullUrl = new URL(stageJson.pullUrl);
const pullUrl = new URL(stageJson.pullUrl, "https://localhost");
const firstPullRes = await handleFileDownloadRoutes(
new Request(pullUrl, {