container: add readme, remove extra formats, remove go-ipld-cbor dependency

This commit is contained in:
Michael Muré
2024-10-07 18:46:19 +02:00
parent 60922ced96
commit 40639b6715
13 changed files with 191 additions and 167 deletions

View File

@@ -38,3 +38,15 @@ func TestCarRoundTrip(t *testing.T) {
// Bytes equal after the round-trip
require.Equal(t, original, buf.Bytes())
}
func FuzzCarRead(f *testing.F) {
example, err := os.ReadFile("testdata/sample-v1.car")
require.NoError(f, err)
f.Add(example)
f.Fuzz(func(t *testing.T, data []byte) {
_, _, _ = readCar(bytes.NewReader(data))
// only looking for panics
})
}