(t *testing.T)
| 61 | } |
| 62 | |
| 63 | func TestLoad_DuplicateBackendName(t *testing.T) { |
| 64 | cfgPath := writeTempConfig(t, ` |
| 65 | backends: |
| 66 | - name: b1 |
| 67 | type: mock |
| 68 | timeout_ms: 100 |
| 69 | cost: { unit: 1, currency: credit } |
| 70 | - name: b1 |
| 71 | type: mock |
| 72 | timeout_ms: 100 |
| 73 | cost: { unit: 1, currency: credit } |
| 74 | tenants: |
| 75 | - id: t1 |
| 76 | routing: |
| 77 | default_backend: b1 |
| 78 | reliability: |
| 79 | fallback_enabled: false |
| 80 | `) |
| 81 | |
| 82 | _, err := Load(cfgPath) |
| 83 | if err == nil || !strings.Contains(err.Error(), "duplicate backend name") { |
| 84 | t.Fatalf("expected duplicate backend validation error, got: %v", err) |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | func TestLoad_DefaultBackendNotFound(t *testing.T) { |
| 89 | cfgPath := writeTempConfig(t, ` |
nothing calls this directly
no test coverage detected