Check error
Some checks failed
Unit and integration tests / Run unit tests (pull_request) Failing after 1s
Unit and integration tests / Run integration tests (pull_request) Failing after 39m14s

This commit is contained in:
Roy Crihfield 2024-04-25 23:19:10 +08:00
parent 042fc9a36c
commit 51b024a2d5

View File

@ -27,7 +27,15 @@ var TestChainConfig = &params.ChainConfig{
Ethash: new(params.EthashConfig), Ethash: new(params.EthashConfig),
} }
var TestDBConfig, _ = postgres.TestConfig.WithEnv() var TestDBConfig postgres.Config
func init() {
var err error
TestDBConfig, err = postgres.TestConfig.WithEnv()
if err != nil {
panic(err)
}
}
func SetupDB() *sqlx.DB { func SetupDB() *sqlx.DB {
db, err := postgres.ConnectSQLX(context.Background(), TestDBConfig) db, err := postgres.ConnectSQLX(context.Background(), TestDBConfig)