verify / verify (push) Successful in 2m55s
Export the reviewed application-neutral package set through the exact public allowlist. Development history and private application evidence remain outside this canonical source root. Developed with material AI assistance under maintainer review. Signed-off-by: Cole Speelman <crspeelman@gmail.com>
23 lines
487 B
Go
23 lines
487 B
Go
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
package analytics
|
|
|
|
import (
|
|
"bytes"
|
|
"testing"
|
|
)
|
|
|
|
func FuzzJSONL(f *testing.F) {
|
|
f.Add([]byte(`{"version":1,"timestamp":"2026-01-01T00:00:00Z","method":"GET","route":"home","status":200}` + "\n"))
|
|
f.Add([]byte("{bad}\n"))
|
|
f.Fuzz(func(t *testing.T, body []byte) {
|
|
if len(body) > 1<<20 {
|
|
t.Skip()
|
|
}
|
|
records, err := ReadJSONL(bytes.NewReader(body), 100)
|
|
if err == nil && len(records) > 100 {
|
|
t.Fatal("record bound exceeded")
|
|
}
|
|
})
|
|
}
|