MCPcopy
hub / github.com/perkeep/perkeep / putRaw

Method putRaw

pkg/server/share_test.go:111–120  ·  view source on GitHub ↗
(ref blob.Ref, data string)

Source from the content-addressed store, hash-verified

109}
110
111func (st *shareTester) putRaw(ref blob.Ref, data string) {
112 if _, err := blobserver.Receive(ctxbg, st.sto, ref, strings.NewReader(data)); err != nil {
113 st.t.Fatalf("error storing %q: %v", ref, err)
114 }
115 if st.handler.idx != nil {
116 if _, err := st.handler.idx.ReceiveBlob(ctxbg, ref, strings.NewReader(data)); err != nil {
117 st.t.Fatalf("error indexing %q, with schema \n%q\n: %v", ref, data, err)
118 }
119 }
120}
121
122func (st *shareTester) put(blob *schema.Blob) {
123 st.putRaw(blob.BlobRef(), blob.JSON())

Callers 7

newShareTesterIdxFunction · 0.95
putMethod · 0.95
TestHandleGetViaSharingFunction · 0.80
TestHandleShareDeletionFunction · 0.80

Calls 3

ReceiveFunction · 0.92
FatalfMethod · 0.65
ReceiveBlobMethod · 0.65

Tested by

no test coverage detected