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

Function TestLoad_FallbackRuleInvalidTrigger

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

Source from the content-addressed store, hash-verified

183}
184
185func TestLoad_FallbackRuleInvalidTrigger(t *testing.T) {
186 cfgPath := writeTempConfig(t, `
187backends:
188 - name: b1
189 type: mock
190 timeout_ms: 100
191 cost: { unit: 1, currency: credit }
192tenants:
193 - id: t1
194routing:
195 default_backend: b1
196reliability:
197 fallback_enabled: true
198 fallback_rules:
199 - from_backend: b1
200 fallback_to: b1
201 on: [not_a_real_trigger]
202`)
203
204 _, err := Load(cfgPath)
205 if err == nil || !strings.Contains(err.Error(), "invalid trigger") {
206 t.Fatalf("expected invalid fallback trigger validation error, got: %v", err)
207 }
208}
209
210func TestLoad_UnsupportedTelemetryExporter(t *testing.T) {
211 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