MCPcopy Create free account
hub / github.com/AdRoll/baker / expectSplits

Function expectSplits

pkg/splitwriter/split_writer_test.go:14–28  ·  view source on GitHub ↗
(t *testing.T, dir string, splits map[string]int)

Source from the content-addressed store, hash-verified

12)
13
14func expectSplits(t *testing.T, dir string, splits map[string]int) {
15 t.Helper()
16
17 for fname, size := range splits {
18 path := path.Join(dir, fname)
19 fi, err := os.Stat(path)
20 if err != nil {
21 t.Fatalf("got %s, want split %q = %v bytes", err, fname, size)
22 }
23
24 if fi.Size() != int64(size) {
25 t.Errorf("got split %q = %v bytes, want %v bytes", fname, fi.Size(), size)
26 }
27 }
28}
29
30func TestSplitWriter(t *testing.T) {
31 dir := t.TempDir()

Callers 1

TestSplitWriterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected