mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-08 01:57:31 +01:00
test: match ownership fixture callback and acquired result
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
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" }),
|
||||
|
||||
Reference in new issue
Block a user