summaryrefslogtreecommitdiff
path: root/internal/executor/container_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/executor/container_test.go')
-rw-r--r--internal/executor/container_test.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/internal/executor/container_test.go b/internal/executor/container_test.go
index 6261cd8..6672dea 100644
--- a/internal/executor/container_test.go
+++ b/internal/executor/container_test.go
@@ -194,6 +194,22 @@ func TestContainerRunner_BuildInnerCmd(t *testing.T) {
}
})
+ t.Run("claude-model-set", func(t *testing.T) {
+ tk := &task.Task{Agent: task.AgentConfig{Type: "claude", Model: "opus"}}
+ cmdStr := strings.Join(runner.buildInnerCmd(tk, &storage.Execution{}, false, false), " ")
+ if !strings.Contains(cmdStr, "--model opus") {
+ t.Errorf("expected --model opus flag when Agent.Model is set, got %q", cmdStr)
+ }
+ })
+
+ t.Run("claude-model-empty", func(t *testing.T) {
+ tk := &task.Task{Agent: task.AgentConfig{Type: "claude"}}
+ cmdStr := strings.Join(runner.buildInnerCmd(tk, &storage.Execution{}, false, false), " ")
+ if strings.Contains(cmdStr, "--model") {
+ t.Errorf("did not expect --model flag when Agent.Model is empty, got %q", cmdStr)
+ }
+ })
+
t.Run("custom-binaries", func(t *testing.T) {
runnerCustom := &ContainerRunner{
ClaudeBinary: "/usr/bin/claude-v2",