MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / checkFileDataAt

Function checkFileDataAt

pkg/filestore/blockstore_test.go:308–317  ·  view source on GitHub ↗
(t *testing.T, ctx context.Context, zoneId string, name string, offset int64, data string)

Source from the content-addressed store, hash-verified

306}
307
308func checkFileDataAt(t *testing.T, ctx context.Context, zoneId string, name string, offset int64, data string) {
309 _, rdata, err := WFS.ReadAt(ctx, zoneId, name, offset, int64(len(data)))
310 if err != nil {
311 t.Errorf("error reading data for file %q: %v", name, err)
312 return
313 }
314 if string(rdata) != data {
315 t.Errorf("data mismatch for file %q: expected %q, got %q", name, data, string(rdata))
316 }
317}
318
319func TestWriteAt(t *testing.T) {
320 initDb(t)

Callers 2

TestMultiPartFunction · 0.85
TestSimpleDBFlushFunction · 0.85

Calls 1

ReadAtMethod · 0.80

Tested by

no test coverage detected