mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-09 20:10:27 +08:00
25 lines
472 B
Go
25 lines
472 B
Go
// Copyright 2024 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
|
|
|
|
package bfs_test
|
|
|
|
import (
|
|
"github.com/TeaOSLab/EdgeNode/internal/utils/bfs"
|
|
"os"
|
|
"testing"
|
|
)
|
|
|
|
func TestBlocksFile_RemoveAll(t *testing.T) {
|
|
bFile, err := bfs.OpenBlocksFile("testdata/test.b", bfs.DefaultBlockFileOptions)
|
|
if err != nil {
|
|
if os.IsNotExist(err) {
|
|
return
|
|
}
|
|
t.Fatal(err)
|
|
}
|
|
|
|
err = bFile.RemoveAll()
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
}
|