(t *testing.T)
| 280 | } |
| 281 | |
| 282 | func TestLoad_InvalidOverloadAction(t *testing.T) { |
| 283 | cfgPath := writeTempConfig(t, ` |
| 284 | backends: |
| 285 | - name: b1 |
| 286 | type: mock |
| 287 | timeout_ms: 100 |
| 288 | cost: { unit: 1, currency: credit } |
| 289 | tenants: |
| 290 | - id: t1 |
| 291 | routing: |
| 292 | default_backend: b1 |
| 293 | reliability: |
| 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 | |
| 306 | func TestLoad_UnsupportedBackendType(t *testing.T) { |
| 307 | cfgPath := writeTempConfig(t, ` |
nothing calls this directly
no test coverage detected