MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / TestBlocksFile_RemoveAll

Function TestBlocksFile_RemoveAll

internal/utils/bfs/blocks_file_test.go:70–86  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

68}
69
70func TestBlocksFile_RemoveAll(t *testing.T) {
71 bFile, err := bfs.OpenBlocksFile("testdata/test.b", bfs.DefaultBlockFileOptions)
72 if err != nil {
73 if os.IsNotExist(err) {
74 return
75 }
76 t.Fatal(err)
77 }
78 defer func() {
79 _ = bFile.Close()
80 }()
81
82 err = bFile.RemoveAll()
83 if err != nil {
84 t.Fatal(err)
85 }
86}

Callers

nothing calls this directly

Calls 3

OpenBlocksFileFunction · 0.92
CloseMethod · 0.65
RemoveAllMethod · 0.45

Tested by

no test coverage detected