mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-04 00:44:27 +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)
|
||
|
}
|
||
|
}
|