test: match ownership fixture callback and acquired result

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-09-27 18:31:36 -05:00
1 parent b727a5659d
commit c2c9996e81
1 file changed
+2 -2
@@ -3,8 +3,8 @@ import type { Db } from "@paperclipai/db";
const sync = vi.hoisted(() => ({ resume: vi.fn() }));
vi.mock("./native-workspace-finalization-ownership.js", () => ({
withNativeWorkspaceFinalizationOwnership: async (_db: Db, _runId: string, action: (owner: unknown) => unknown) =>
action({ token: "fixture-owner", assertHeld: async () => {} }),
withNativeWorkspaceFinalizationOwnership: async (_input: unknown, action: (owner: unknown) => unknown) =>
({ acquired: true, value: await action({ token: "fixture-owner", assertHeld: async () => {} }) }),
}));
vi.mock("./native-workspace-sync.js", () => ({
readNativeWorkspaceSyncReference: () => ({ leaseId: "lease", providerLeaseId: "sandbox", workspaceId: "workspace" }),