MCPcopy
hub / github.com/wavetermdev/waveterm / checkFileData

Function checkFileData

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

Source from the content-addressed store, hash-verified

278}
279
280func checkFileData(t *testing.T, ctx context.Context, zoneId string, name string, data string) {
281 _, rdata, err := WFS.ReadFile(ctx, zoneId, name)
282 if err != nil {
283 t.Errorf("error reading data for file %q: %v", name, err)
284 return
285 }
286 if string(rdata) != data {
287 t.Errorf("data mismatch for file %q: expected %q, got %q", name, data, string(rdata))
288 }
289}
290
291func checkFileByteCount(t *testing.T, ctx context.Context, zoneId string, name string, val byte, expected int) {
292 _, rdata, err := WFS.ReadFile(ctx, zoneId, name)

Callers 6

TestWriteAtFunction · 0.85
TestAppendFunction · 0.85
TestWriteFileFunction · 0.85
TestCircularWritesFunction · 0.85
TestMultiPartFunction · 0.85
TestSimpleDBFlushFunction · 0.85

Calls 1

ReadFileMethod · 0.80

Tested by

no test coverage detected