mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-26 21:27:19 +00:00
14b3181e67
* more spanner additions * implement iface * begin implement * wrapped up spanner functions * rem interface * added in necessary comments * comments on enums * begin adding tests * plug in surround vote detection * saved indexed db implementation * finally plugin slashing for historical data * Small fixes * add in all gazelle * save incoming new functions * resolve todo * fix broken test channel item * tests passing when fixing certain arguments and setups * Add comment and change unimplemented * find surround * added in gazelle * gazz * feedback from shay * fixed up naming * Update * Add tests for detectSurroundVotes * Remove logs * Fix slasher test * formatting * Remove unneeded condition * Test indices better * fixing broken build * pass tests * skip tests * imports * Update slasher/detection/attestations/attestations_test.go * Update slasher/beaconclient/historical_data_retrieval_test.go * Address comments * Rename function * Add comment for future optimization * Fix comment Co-authored-by: Ivan Martinez <ivanthegreatdev@gmail.com>
19 lines
336 B
Go
19 lines
336 B
Go
package testing
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
)
|
|
|
|
func TestClearDB(t *testing.T) {
|
|
slasherDB := SetupSlasherDB(t, false)
|
|
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)
|
|
}
|
|
}
|