(t *testing.T)
| 231 | } |
| 232 | |
| 233 | func TestLoad_OTLPHTTPRequiresEndpoint(t *testing.T) { |
| 234 | cfgPath := writeTempConfig(t, ` |
| 235 | telemetry: |
| 236 | exporter: otlp-http |
| 237 | backends: |
| 238 | - name: b1 |
| 239 | type: mock |
| 240 | timeout_ms: 100 |
| 241 | cost: { unit: 1, currency: credit } |
| 242 | tenants: |
| 243 | - id: t1 |
| 244 | routing: |
| 245 | default_backend: b1 |
| 246 | reliability: |
| 247 | fallback_enabled: false |
| 248 | `) |
| 249 | |
| 250 | _, err := Load(cfgPath) |
| 251 | if err == nil || !strings.Contains(err.Error(), "otlp_endpoint is required") { |
| 252 | t.Fatalf("expected otlp endpoint validation error, got: %v", err) |
| 253 | } |
| 254 | } |
| 255 | |
| 256 | func TestLoad_DefaultExporterFromOTLPEndpoint(t *testing.T) { |
| 257 | cfgPath := writeTempConfig(t, ` |
nothing calls this directly
no test coverage detected