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

Function TestQueryRangeRequest_MarshalUnmarshal

pkg/tempopb/utils_test.go:23–36  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

21}
22
23func TestQueryRangeRequest_MarshalUnmarshal(t *testing.T) {
24 var q tempopb.QueryRangeRequest
25 assert.False(t, q.HasInstant())
26
27 q.SetInstant(true)
28 q = marshalUnmarshal(t, q)
29 assert.True(t, q.HasInstant())
30 assert.True(t, q.GetInstant())
31
32 q.SetInstant(false)
33 q = marshalUnmarshal(t, q)
34 assert.True(t, q.HasInstant())
35 assert.False(t, q.GetInstant())
36}
37
38func marshalUnmarshal(t *testing.T, q tempopb.QueryRangeRequest) tempopb.QueryRangeRequest {
39 marshaled, err := q.Marshal()

Callers

nothing calls this directly

Calls 4

HasInstantMethod · 0.95
SetInstantMethod · 0.95
GetInstantMethod · 0.95
marshalUnmarshalFunction · 0.85

Tested by

no test coverage detected