summaryrefslogtreecommitdiff
path: root/internal/executor/claude_test.go
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-03-07 23:51:20 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-03-08 04:52:10 +0000
commit9d2fc7663a161bb471a9defc3000212264767866 (patch)
tree47bafcdb08598bd25a6aca70308fc0d1a45956da /internal/executor/claude_test.go
parent877da0a4cab46eab33148e0d331167edb46d521f (diff)
test(executor): update claude_test.go to use AgentConfig
Diffstat (limited to 'internal/executor/claude_test.go')
-rw-r--r--internal/executor/claude_test.go27
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,
},