MCPcopy Create free account
hub / github.com/InferCore/InferCore / TestLoad_InvalidOverloadAction

Function TestLoad_InvalidOverloadAction

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

Source from the content-addressed store, hash-verified

280}
281
282func TestLoad_InvalidOverloadAction(t *testing.T) {
283 cfgPath := writeTempConfig(t, `
284backends:
285 - name: b1
286 type: mock
287 timeout_ms: 100
288 cost: { unit: 1, currency: credit }
289tenants:
290 - id: t1
291routing:
292 default_backend: b1
293reliability:
294 fallback_enabled: false
295 overload:
296 queue_limit: 10
297 action: not-a-valid-action
298`)
299
300 _, err := Load(cfgPath)
301 if err == nil || !strings.Contains(err.Error(), "overload.action") {
302 t.Fatalf("expected overload.action validation error, got: %v", err)
303 }
304}
305
306func TestLoad_UnsupportedBackendType(t *testing.T) {
307 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