diff options
| -rw-r--r-- | internal/executor/claude_test.go | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/internal/executor/claude_test.go b/internal/executor/claude_test.go index 056c7e8..dba7470 100644 --- a/internal/executor/claude_test.go +++ b/internal/executor/claude_test.go @@ -14,7 +14,8 @@ import ( func TestClaudeRunner_BuildArgs_BasicTask(t *testing.T) { r := &ClaudeRunner{} tk := &task.Task{ - Claude: task.ClaudeConfig{ + Agent: task.AgentConfig{ + Type: "claude", Instructions: "fix the bug", Model: "sonnet", SkipPlanning: true, @@ -37,7 +38,8 @@ func TestClaudeRunner_BuildArgs_BasicTask(t *testing.T) { func TestClaudeRunner_BuildArgs_FullConfig(t *testing.T) { r := &ClaudeRunner{} tk := &task.Task{ - Claude: task.ClaudeConfig{ + Agent: task.AgentConfig{ + Type: "claude", Instructions: "implement feature", Model: "opus", MaxBudgetUSD: 5.0, @@ -79,7 +81,8 @@ func TestClaudeRunner_BuildArgs_FullConfig(t *testing.T) { func TestClaudeRunner_BuildArgs_DefaultsToBypassPermissions(t *testing.T) { r := &ClaudeRunner{} tk := &task.Task{ - Claude: task.ClaudeConfig{ + Agent: task.AgentConfig{ + Type: "claude", Instructions: "do work", SkipPlanning: true, // PermissionMode intentionally not set @@ -102,7 +105,8 @@ func TestClaudeRunner_BuildArgs_DefaultsToBypassPermissions(t *testing.T) { func TestClaudeRunner_BuildArgs_RespectsExplicitPermissionMode(t *testing.T) { r := &ClaudeRunner{} tk := &task.Task{ - Claude: task.ClaudeConfig{ + Agent: task.AgentConfig{ + Type: "claude", Instructions: "do work", PermissionMode: "default", SkipPlanning: true, @@ -125,7 +129,8 @@ func TestClaudeRunner_BuildArgs_RespectsExplicitPermissionMode(t *testing.T) { func TestClaudeRunner_BuildArgs_AlwaysIncludesVerbose(t *testing.T) { r := &ClaudeRunner{} tk := &task.Task{ - Claude: task.ClaudeConfig{ + Agent: task.AgentConfig{ + Type: "claude", Instructions: "do something", SkipPlanning: true, }, @@ -148,7 +153,8 @@ func TestClaudeRunner_BuildArgs_AlwaysIncludesVerbose(t *testing.T) { func TestClaudeRunner_BuildArgs_PreamblePrepended(t *testing.T) { r := &ClaudeRunner{} tk := &task.Task{ - Claude: task.ClaudeConfig{ + Agent: task.AgentConfig{ + Type: "claude", Instructions: "fix the bug", SkipPlanning: false, }, @@ -171,7 +177,8 @@ func TestClaudeRunner_BuildArgs_PreamblePrepended(t *testing.T) { func TestClaudeRunner_BuildArgs_PreambleAddsBash(t *testing.T) { r := &ClaudeRunner{} tk := &task.Task{ - Claude: task.ClaudeConfig{ + Agent: task.AgentConfig{ + Type: "claude", Instructions: "do work", AllowedTools: []string{"Read"}, SkipPlanning: false, @@ -195,7 +202,8 @@ func TestClaudeRunner_BuildArgs_PreambleAddsBash(t *testing.T) { func TestClaudeRunner_BuildArgs_PreambleBashNotDuplicated(t *testing.T) { r := &ClaudeRunner{} tk := &task.Task{ - Claude: task.ClaudeConfig{ + Agent: task.AgentConfig{ + Type: "claude", Instructions: "do work", AllowedTools: []string{"Bash", "Read"}, SkipPlanning: false, @@ -223,7 +231,8 @@ func TestClaudeRunner_Run_InaccessibleWorkingDir_ReturnsError(t *testing.T) { LogDir: t.TempDir(), } tk := &task.Task{ - Claude: task.ClaudeConfig{ + Agent: task.AgentConfig{ + Type: "claude", WorkingDir: "/nonexistent/path/does/not/exist", SkipPlanning: true, }, |
