update tests, helper methods, etc for changed interfaces linted and some tests updated... statediff tests failing on filesystem call locally undo changes to go.mod from rebase changed ref and repo to try old stack-orch with miner.etherbase arg turn off new tests yml for old tests with hack for old stack-orchestrator
29 lines
641 B
Go
29 lines
641 B
Go
package sql_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
"github.com/ethereum/go-ethereum/statediff/indexer/database/sql"
|
|
"github.com/ethereum/go-ethereum/statediff/indexer/interfaces"
|
|
"github.com/ethereum/go-ethereum/statediff/indexer/test_helpers"
|
|
)
|
|
|
|
var (
|
|
db sql.Database
|
|
err error
|
|
ind interfaces.StateDiffIndexer
|
|
)
|
|
|
|
func checkTxClosure(t *testing.T, idle, inUse, open int64) {
|
|
require.Equal(t, idle, db.Stats().Idle())
|
|
require.Equal(t, inUse, db.Stats().InUse())
|
|
require.Equal(t, open, db.Stats().Open())
|
|
}
|
|
|
|
func tearDown(t *testing.T) {
|
|
test_helpers.TearDownDB(t, db)
|
|
require.NoError(t, ind.Close())
|
|
}
|