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

Function checkFileSize

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

Source from the content-addressed store, hash-verified

263}
264
265func checkFileSize(t *testing.T, ctx context.Context, zoneId string, name string, size int64) {
266 file, err := WFS.Stat(ctx, zoneId, name)
267 if err != nil {
268 t.Errorf("error stating file %q: %v", name, err)
269 return
270 }
271 if file == nil {
272 t.Errorf("file %q not found", name)
273 return
274 }
275 if file.Size != size {
276 t.Errorf("size mismatch for file %q: expected %d, got %d", name, size, file.Size)
277 }
278}
279
280func checkFileData(t *testing.T, ctx context.Context, zoneId string, name string, data string) {
281 _, rdata, err := WFS.ReadFile(ctx, zoneId, name)

Callers 6

TestWriteAtFunction · 0.70
TestAppendFunction · 0.70
TestCircularWritesFunction · 0.70
TestMultiPartFunction · 0.70
TestSimpleDBFlushFunction · 0.70
TestConcurrentAppendFunction · 0.70

Calls 1

StatMethod · 0.80

Tested by

no test coverage detected