MCPcopy Index your code
hub / github.com/evilsocket/sum / TestLoaderLoadWithError

Function TestLoaderLoadWithError

storage/loader_test.go:132–143  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

130}
131
132func TestLoaderLoadWithError(t *testing.T) {
133 setupRawRecords(t)
134 defer teardownRecords(t)
135
136 var rec pb.Record
137
138 if err := Load("/lulz.dat", &rec); err == nil {
139 t.Fatal("error expected for /lulz.dat")
140 } else if err := Load(testBroken, &rec); err == nil {
141 t.Fatalf("erorr expected for %s", testBroken)
142 }
143}

Callers

nothing calls this directly

Calls 3

setupRawRecordsFunction · 0.85
LoadFunction · 0.85
teardownRecordsFunction · 0.70

Tested by

no test coverage detected