MCPcopy Create free account
hub / github.com/InferCore/InferCore / TestLoad_OTLPHTTPRequiresEndpoint

Function TestLoad_OTLPHTTPRequiresEndpoint

internal/config/config_test.go:233–254  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

231}
232
233func TestLoad_OTLPHTTPRequiresEndpoint(t *testing.T) {
234 cfgPath := writeTempConfig(t, `
235telemetry:
236 exporter: otlp-http
237backends:
238 - name: b1
239 type: mock
240 timeout_ms: 100
241 cost: { unit: 1, currency: credit }
242tenants:
243 - id: t1
244routing:
245 default_backend: b1
246reliability:
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
256func TestLoad_DefaultExporterFromOTLPEndpoint(t *testing.T) {
257 cfgPath := writeTempConfig(t, `

Callers

nothing calls this directly

Calls 3

writeTempConfigFunction · 0.85
LoadFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected