MCPcopy Create free account
hub / github.com/buggregator/server / TestAPILogsList

Function TestAPILogsList

modules/sentry/api_test.go:349–368  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

347}
348
349func TestAPILogsList(t *testing.T) {
350 mux := http.NewServeMux()
351 seedTestData(t, mux)
352
353 req := httptest.NewRequest("GET", "/api/sentry/logs", nil)
354 w := httptest.NewRecorder()
355 mux.ServeHTTP(w, req)
356
357 if w.Code != 200 {
358 t.Fatalf("status = %d, want 200", w.Code)
359 }
360
361 var resp map[string]any
362 json.Unmarshal(w.Body.Bytes(), &resp)
363
364 data := resp["data"].([]any)
365 if len(data) != 3 {
366 t.Fatalf("data length = %d, want 3", len(data))
367 }
368}
369
370func TestAPILogsFilterByTraceID(t *testing.T) {
371 mux := http.NewServeMux()

Callers

nothing calls this directly

Calls 2

seedTestDataFunction · 0.85
ServeHTTPMethod · 0.80

Tested by

no test coverage detected