(t *testing.T)
| 269 | } |
| 270 | |
| 271 | func TestLoadAgentConfigInvalidYAML(t *testing.T) { |
| 272 | tmpDir := t.TempDir() |
| 273 | configPath := filepath.Join(tmpDir, "invalid.yaml") |
| 274 | |
| 275 | err := os.WriteFile(configPath, []byte("invalid: yaml: content: ["), 0644) |
| 276 | if err != nil { |
| 277 | t.Fatalf("failed to write test config: %v", err) |
| 278 | } |
| 279 | |
| 280 | loader := NewLoader() |
| 281 | _, err = loader.LoadAgentConfig(configPath) |
| 282 | if err == nil { |
| 283 | t.Error("expected error for invalid YAML") |
| 284 | } |
| 285 | } |
| 286 | |
| 287 | func TestLoadAgentConfigMissingRequiredField(t *testing.T) { |
| 288 | tmpDir := t.TempDir() |
nothing calls this directly
no test coverage detected