mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-31 23:41:22 +00:00
19 lines
324 B
Go
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)
|
|
}
|
|
}
|