MCPcopy Create free account
hub / github.com/evilsocket/sum / TestIndexDeleteRecordWithInvalidId

Function TestIndexDeleteRecordWithInvalidId

storage/index_test.go:315–329  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

313}
314
315func TestIndexDeleteRecordWithInvalidId(t *testing.T) {
316 setupRecords(t, false, false)
317 defer teardownRecords(t)
318
319 i := setupIndex(testFolder)
320 if err := i.Load(); err != nil {
321 t.Fatal(err)
322 }
323
324 for n := 0; n < testRecords; n++ {
325 if m := i.Delete(uint64(n + 1)); m != nil {
326 t.Fatalf("record with id %d was not expected to be found", n+1)
327 }
328 }
329}

Callers

nothing calls this directly

Calls 5

setupIndexFunction · 0.85
LoadMethod · 0.80
setupRecordsFunction · 0.70
teardownRecordsFunction · 0.70
DeleteMethod · 0.45

Tested by

no test coverage detected