(t *testing.T, agentDir string, name string)
| 4103 | } |
| 4104 | |
| 4105 | func writeAgentDefInDir(t *testing.T, agentDir string, name string) { |
| 4106 | t.Helper() |
| 4107 | |
| 4108 | if err := os.MkdirAll(agentDir, 0o755); err != nil { |
| 4109 | t.Fatalf("os.MkdirAll(%q) error = %v", agentDir, err) |
| 4110 | } |
| 4111 | content := strings.Join([]string{ |
| 4112 | "---", |
| 4113 | "name: " + name, |
| 4114 | "provider: fake", |
| 4115 | "model: fake-model", |
| 4116 | "---", |
| 4117 | "", |
| 4118 | "You are the integration test agent.", |
| 4119 | }, "\n") |
| 4120 | if err := os.WriteFile(filepath.Join(agentDir, "AGENT.md"), []byte(content), 0o644); err != nil { |
| 4121 | t.Fatalf("os.WriteFile(AGENT.md) error = %v", err) |
| 4122 | } |
| 4123 | } |
| 4124 | |
| 4125 | func mustExecuteRoot(t *testing.T, deps commandDeps, args ...string) string { |
| 4126 | t.Helper() |
no test coverage detected