MCPcopy Index your code
hub / github.com/InferCore/InferCore / TestLoad_DefaultBackendNotFound

Function TestLoad_DefaultBackendNotFound

internal/config/config_test.go:88–107  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

86}
87
88func TestLoad_DefaultBackendNotFound(t *testing.T) {
89 cfgPath := writeTempConfig(t, `
90backends:
91 - name: b1
92 type: mock
93 timeout_ms: 100
94 cost: { unit: 1, currency: credit }
95tenants:
96 - id: t1
97routing:
98 default_backend: missing
99reliability:
100 fallback_enabled: false
101`)
102
103 _, err := Load(cfgPath)
104 if err == nil || !strings.Contains(err.Error(), "default backend") {
105 t.Fatalf("expected default backend validation error, got: %v", err)
106 }
107}
108
109func TestLoad_FallbackTargetNotFound(t *testing.T) {
110 cfgPath := writeTempConfig(t, `

Callers

nothing calls this directly

Calls 3

writeTempConfigFunction · 0.85
LoadFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected