(t *testing.T)
| 183 | } |
| 184 | |
| 185 | func TestLoad_FallbackRuleInvalidTrigger(t *testing.T) { |
| 186 | cfgPath := writeTempConfig(t, ` |
| 187 | backends: |
| 188 | - name: b1 |
| 189 | type: mock |
| 190 | timeout_ms: 100 |
| 191 | cost: { unit: 1, currency: credit } |
| 192 | tenants: |
| 193 | - id: t1 |
| 194 | routing: |
| 195 | default_backend: b1 |
| 196 | reliability: |
| 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 | |
| 210 | func TestLoad_UnsupportedTelemetryExporter(t *testing.T) { |
| 211 | cfgPath := writeTempConfig(t, ` |
nothing calls this directly
no test coverage detected