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

Function actualLogSpan

modules/distributor/distributor_test.go:1435–1443  ·  view source on GitHub ↗
(t *testing.T, buf *bytes.Buffer)

Source from the content-addressed store, hash-verified

1433}
1434
1435func actualLogSpan(t *testing.T, buf *bytes.Buffer) []testLogSpan {
1436 bufJSON := "[" + strings.TrimRight(strings.ReplaceAll(buf.String(), "\n", ","), ",") + "]"
1437 var actualLogsSpan []testLogSpan
1438 err := json.Unmarshal([]byte(bufJSON), &actualLogsSpan)
1439 if err != nil {
1440 t.Fatal(err)
1441 }
1442 return actualLogsSpan
1443}
1444
1445func TestRateLimitRespected(t *testing.T) {
1446 // prepare test data

Callers 1

TestLogReceivedSpansFunction · 0.85

Calls 2

UnmarshalMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected