MCPcopy Create free account
hub / github.com/astercloud/aster / TestLoadAgentConfigMissingRequiredField

Function TestLoadAgentConfigMissingRequiredField

pkg/config/loader_test.go:287–308  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

285}
286
287func TestLoadAgentConfigMissingRequiredField(t *testing.T) {
288 tmpDir := t.TempDir()
289 configPath := filepath.Join(tmpDir, "missing.yaml")
290
291 // Missing template_id
292 configContent := `
293model_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
310func TestLoadModelConfig(t *testing.T) {
311 tmpDir := t.TempDir()

Callers

nothing calls this directly

Calls 4

LoadAgentConfigMethod · 0.95
NewLoaderFunction · 0.70
ErrorMethod · 0.65
JoinMethod · 0.45

Tested by

no test coverage detected