MCPcopy
hub / github.com/grafana/tempo / newTestResponse

Function newTestResponse

modules/frontend/combiner/common_test.go:223–236  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

221}
222
223func newTestResponse(t *testing.T) *testPipelineResponse {
224 serviceStats := &tempopb.ServiceStats{
225 SpanCount: 1,
226 ErrorCount: 1,
227 }
228
229 rec := httptest.NewRecorder()
230 err := (&jsonpb.Marshaler{}).Marshal(rec, serviceStats)
231 require.NoError(t, err)
232
233 return &testPipelineResponse{
234 r: rec.Result(),
235 }
236}
237
238func newFailedTestResponse() *testPipelineResponse {
239 rec := httptest.NewRecorder()

Callers 3

TestGenericCombinerFunction · 0.85

Calls 2

MarshalMethod · 0.65
ResultMethod · 0.65

Tested by

no test coverage detected