MCPcopy Create free account
hub / github.com/compozy/agh / writeAgentDefInDir

Function writeAgentDefInDir

internal/cli/cli_integration_test.go:4105–4123  ·  view source on GitHub ↗
(t *testing.T, agentDir string, name string)

Source from the content-addressed store, hash-verified

4103}
4104
4105func 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
4125func mustExecuteRoot(t *testing.T, deps commandDeps, args ...string) string {
4126 t.Helper()

Callers 2

writeAgentDefFunction · 0.85
writeWorkspaceAgentDefFunction · 0.85

Calls 1

WriteFileMethod · 0.65

Tested by

no test coverage detected