MCPcopy
hub / github.com/perkeep/perkeep / TestStaticStreamer

Function TestStaticStreamer

pkg/blobserver/multistream_test.go:56–67  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

54}
55
56func TestStaticStreamer(t *testing.T) {
57 var blobs []*blob.Blob
58 var want []blob.SizedRef
59 for i := 0; i < 5; i++ {
60 tb := &test.Blob{Contents: strconv.Itoa(i)}
61 b := tb.Blob()
62 blobs = append(blobs, b)
63 want = append(want, b.SizedRef())
64 }
65 bs := staticStreamer(blobs)
66 storagetest.TestStreamer(t, bs, storagetest.WantSizedRefs(want))
67}
68
69func TestMultiStreamer(t *testing.T) {
70 var streamers []blobserver.BlobStreamer

Callers

nothing calls this directly

Calls 5

BlobMethod · 0.95
TestStreamerFunction · 0.92
WantSizedRefsTypeAlias · 0.92
staticStreamerTypeAlias · 0.85
SizedRefMethod · 0.45

Tested by

no test coverage detected