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

Function TestLabelBuilder_InvalidUTF8

modules/generator/registry/builder_test.go:36–43  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

34}
35
36func TestLabelBuilder_InvalidUTF8(t *testing.T) {
37 builder := NewLabelBuilder(0, 0, newTestDrainSanitizer(SpanNameSanitizationDisabled), newTestLabelLimiter())
38 builder.Add("name", "svc-\xc3\x28") // Invalid UTF-8
39
40 _, ok := builder.CloseAndBuildLabels()
41
42 assert.False(t, ok)
43}
44
45func TestSafeBuilderPool(t *testing.T) {
46 pool := newSafeBuilderPool()

Callers

nothing calls this directly

Calls 5

AddMethod · 0.95
CloseAndBuildLabelsMethod · 0.95
NewLabelBuilderFunction · 0.85
newTestDrainSanitizerFunction · 0.85
newTestLabelLimiterFunction · 0.85

Tested by

no test coverage detected