test(FN-4948): assert guard wiring and cleanup behavior
Fusion-Task-Id: FN-4948 Fusion-Task-Lineage: dc622643-4c3e-4217-9219-a6a6e5424427
This commit is contained in:
committed by
gsxdsm
parent
4b16429618
commit
e66f0892f0
@@ -36,6 +36,7 @@ import {
|
||||
mockedIsUsableTaskWorktree,
|
||||
mockedClassifyStaleLock,
|
||||
mockedTryRemoveStaleLock,
|
||||
mockedInstallTaskWorktreeIdentityGuard,
|
||||
mockExecuteAll,
|
||||
mockTerminateAllSessions,
|
||||
mockCleanup,
|
||||
@@ -2155,6 +2156,9 @@ describe("TaskExecutor worktree pool integration", () => {
|
||||
(c) => typeof c[0] === "string" && (c[0] as string).includes("worktree add"),
|
||||
);
|
||||
expect(worktreeAddCalls.length).toBeGreaterThan(0);
|
||||
expect(mockedInstallTaskWorktreeIdentityGuard).toHaveBeenCalledWith(
|
||||
expect.objectContaining({ taskId: "FN-020" }),
|
||||
);
|
||||
|
||||
// Should log worktree creation, NOT pool acquisition
|
||||
expect(store.logEntry).toHaveBeenCalledWith(
|
||||
|
||||
@@ -1173,7 +1173,9 @@ describe("StepSessionExecutor", () => {
|
||||
expect.stringContaining("git worktree add"),
|
||||
expect.anything(),
|
||||
);
|
||||
expect(mockedInstallTaskWorktreeIdentityGuard).toHaveBeenCalled();
|
||||
expect(mockedInstallTaskWorktreeIdentityGuard).toHaveBeenCalledWith(
|
||||
expect.objectContaining({ taskId: "FN-001" }),
|
||||
);
|
||||
});
|
||||
|
||||
it("handles parallel step failure: successful step cherry-picked, failed cleaned up", async () => {
|
||||
|
||||
Reference in New Issue
Block a user