(t *testing.T)
| 285 | } |
| 286 | |
| 287 | func TestLoadAgentConfigMissingRequiredField(t *testing.T) { |
| 288 | tmpDir := t.TempDir() |
| 289 | configPath := filepath.Join(tmpDir, "missing.yaml") |
| 290 | |
| 291 | // Missing template_id |
| 292 | configContent := ` |
| 293 | model_config: |
| 294 | provider: "anthropic" |
| 295 | model: "claude-3-5-sonnet" |
| 296 | ` |
| 297 | |
| 298 | err := os.WriteFile(configPath, []byte(configContent), 0644) |
| 299 | if err != nil { |
| 300 | t.Fatalf("failed to write test config: %v", err) |
| 301 | } |
| 302 | |
| 303 | loader := NewLoader() |
| 304 | _, err = loader.LoadAgentConfig(configPath) |
| 305 | if err == nil { |
| 306 | t.Error("expected error for missing template_id") |
| 307 | } |
| 308 | } |
| 309 | |
| 310 | func TestLoadModelConfig(t *testing.T) { |
| 311 | tmpDir := t.TempDir() |
nothing calls this directly
no test coverage detected