MCPcopy
hub / github.com/kopia/kopia / mustWriteFileWithRepeatedData

Function mustWriteFileWithRepeatedData

cli/command_snapshot_fix_test.go:428–440  ·  view source on GitHub ↗
(t *testing.T, fname string, repeat int, data []byte)

Source from the content-addressed store, hash-verified

426}
427
428func mustWriteFileWithRepeatedData(t *testing.T, fname string, repeat int, data []byte) {
429 t.Helper()
430
431 f, err := os.Create(fname)
432 require.NoError(t, err)
433
434 defer f.Close()
435
436 for range repeat {
437 _, err := f.Write(data)
438 require.NoError(t, err)
439 }
440}

Callers 2

TestSnapshotVerifyFunction · 0.85
TestSnapshotFixFunction · 0.85

Calls 3

HelperMethod · 0.80
CloseMethod · 0.65
WriteMethod · 0.45

Tested by

no test coverage detected