status-go/services/wallet/walletconnect/testing.go

20 lines
413 B
Go
Raw Normal View History

package walletconnect
import (
"database/sql"
"testing"
"github.com/stretchr/testify/require"
"github.com/status-im/status-go/t/helpers"
"github.com/status-im/status-go/walletdatabase"
)
func SetupTestDB(t *testing.T) (db *sql.DB, close func()) {
db, err := helpers.SetupTestMemorySQLDB(walletdatabase.DbInitializer{})
require.NoError(t, err)
return db, func() {
require.NoError(t, db.Close())
}
}