(t *testing.T)
| 356 | } |
| 357 | |
| 358 | func TestLoad_GeminiBackendMissingAPIKey(t *testing.T) { |
| 359 | cfgPath := writeTempConfig(t, ` |
| 360 | backends: |
| 361 | - name: gem |
| 362 | type: gemini |
| 363 | timeout_ms: 100 |
| 364 | default_model: gemini-2.0-flash |
| 365 | cost: { unit: 1, currency: credit } |
| 366 | tenants: |
| 367 | - id: t1 |
| 368 | routing: |
| 369 | default_backend: gem |
| 370 | reliability: |
| 371 | fallback_enabled: false |
| 372 | `) |
| 373 | |
| 374 | _, err := Load(cfgPath) |
| 375 | if err == nil || !strings.Contains(err.Error(), "requires api_key") { |
| 376 | t.Fatalf("expected gemini api_key validation error, got: %v", err) |
| 377 | } |
| 378 | } |
| 379 | |
| 380 | func TestLoad_GeminiBackendMissingDefaultModel(t *testing.T) { |
| 381 | cfgPath := writeTempConfig(t, ` |
nothing calls this directly
no test coverage detected