MCPcopy Create free account
hub / github.com/buggregator/server / TestParseEnvelopeItems_HeaderOnly

Function TestParseEnvelopeItems_HeaderOnly

modules/sentry/envelope_test.go:121–133  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

119}
120
121func TestParseEnvelopeItems_HeaderOnly(t *testing.T) {
122 body := []byte(`{"event_id":"only-header"}`)
123 header, items, err := parseEnvelopeItems(body)
124 if err != nil {
125 t.Fatal(err)
126 }
127 if header.EventID != "only-header" {
128 t.Errorf("header.EventID = %q", header.EventID)
129 }
130 if len(items) != 0 {
131 t.Errorf("items = %d, want 0", len(items))
132 }
133}
134
135func TestParseEnvelopeItems_LengthBeyondBody_FallsBackToNewline(t *testing.T) {
136 // length declares more bytes than the body has — the parser must fall back

Callers

nothing calls this directly

Calls 1

parseEnvelopeItemsFunction · 0.85

Tested by

no test coverage detected