mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-23 11:57:18 +00:00
2473680759
* Add interface and move slashing types to /types package * Add spans for all DB functions * Fix packages * Fix func call
24 lines
450 B
Go
24 lines
450 B
Go
package testing
|
|
|
|
import (
|
|
"flag"
|
|
"os"
|
|
"testing"
|
|
|
|
"github.com/urfave/cli"
|
|
)
|
|
|
|
func TestClearDB(t *testing.T) {
|
|
app := cli.NewApp()
|
|
set := flag.NewFlagSet("test", 0)
|
|
slasherDB := SetupSlasherDB(t, cli.NewContext(app, set, nil))
|
|
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)
|
|
}
|
|
}
|