(t *testing.T)
| 86 | } |
| 87 | |
| 88 | func TestLoad_DefaultBackendNotFound(t *testing.T) { |
| 89 | cfgPath := writeTempConfig(t, ` |
| 90 | backends: |
| 91 | - name: b1 |
| 92 | type: mock |
| 93 | timeout_ms: 100 |
| 94 | cost: { unit: 1, currency: credit } |
| 95 | tenants: |
| 96 | - id: t1 |
| 97 | routing: |
| 98 | default_backend: missing |
| 99 | reliability: |
| 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 | |
| 109 | func TestLoad_FallbackTargetNotFound(t *testing.T) { |
| 110 | cfgPath := writeTempConfig(t, ` |
nothing calls this directly
no test coverage detected