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

Function TestUnMarshalToJSONV1

pkg/tempopb/trace_utils_test.go:29–38  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

27}
28
29func TestUnMarshalToJSONV1(t *testing.T) {
30 file, _ := os.Open("trace.json")
31 defer file.Close()
32 trace := &Trace{}
33 content, _ := io.ReadAll(file)
34 err := UnmarshalFromJSONV1(content, trace)
35
36 assert.NoError(t, err)
37 assert.Equal(t, "my.library", trace.ResourceSpans[0].ScopeSpans[0].Scope.Name)
38}

Callers

nothing calls this directly

Calls 4

UnmarshalFromJSONV1Function · 0.85
CloseMethod · 0.65
ReadAllMethod · 0.65
EqualMethod · 0.45

Tested by

no test coverage detected