(t *testing.T)
| 521 | } |
| 522 | |
| 523 | func TestExecuteAlreadyCompleted(t *testing.T) { |
| 524 | toolMap := map[string]tools.Tool{ |
| 525 | "tool1": newMockTool("tool1", "result1", nil), |
| 526 | } |
| 527 | |
| 528 | executor := NewExecutor(toolMap) |
| 529 | |
| 530 | plan := NewExecutionPlan("Already completed test") |
| 531 | plan.AddStep("tool1", "Step 1", nil) |
| 532 | plan.Status = StatusCompleted |
| 533 | |
| 534 | ctx := context.Background() |
| 535 | toolCtx := &tools.ToolContext{AgentID: "test-agent"} |
| 536 | |
| 537 | err := executor.Execute(ctx, plan, toolCtx) |
| 538 | if err == nil { |
| 539 | t.Fatal("expected error for already completed plan") |
| 540 | } |
| 541 | } |
| 542 | |
| 543 | func TestResume(t *testing.T) { |
| 544 | tool1 := newMockTool("tool1", "result1", nil) |
nothing calls this directly
no test coverage detected