prysm-pulse/slasher/db/setup_db_test.go
2019-09-26 09:29:10 -07:00

19 lines
324 B
Go

package db
import (
"os"
"testing"
)
func TestClearDB(t *testing.T) {
slasherDB := SetupSlasherDB(t)
defer TeardownSlasherDB(t, slasherDB)
if err := slasherDB.ClearDB(); err != nil {
t.Fatal(err)
}
if _, err := os.Stat(slasherDB.DatabasePath()); !os.IsNotExist(err) {
t.Fatalf("db wasnt cleared %v", err)
}
}