MCPcopy Create free account
hub / github.com/Code-Hex/pget / cmpFileChecksum

Function cmpFileChecksum

pget_test.go:122–138  ·  view source on GitHub ↗
(t *testing.T, wantPath, gotPath string)

Source from the content-addressed store, hash-verified

120}
121
122func cmpFileChecksum(t *testing.T, wantPath, gotPath string) {
123 t.Helper()
124 want, err := get2md5(wantPath)
125
126 if err != nil {
127 t.Fatalf("failed to md5sum of original file: %s", err)
128 }
129
130 resultfp, err := get2md5(gotPath)
131 if err != nil {
132 t.Fatalf("failed to md5sum of result file: %s", err)
133 }
134
135 if want != resultfp {
136 t.Errorf("expected %s got %s", want, resultfp)
137 }
138}

Callers 2

TestPgetFunction · 0.85
TestRunResumeFunction · 0.85

Calls 1

get2md5Function · 0.85

Tested by

no test coverage detected