1
This commit is contained in:
@ -2,6 +2,7 @@ package jobs
|
||||
|
||||
import (
|
||||
"go-admin/config"
|
||||
helper "go-admin/utils/redishelper"
|
||||
"testing"
|
||||
|
||||
"github.com/go-admin-team/go-admin-core/sdk"
|
||||
@ -17,7 +18,23 @@ func TestTransferJob(t *testing.T) {
|
||||
config.ExtConfig.ApiEndpoint = "https://stylish-cool-fire.ethereum-sepolia.quiknode.pro/17572db4c091accfa5dc6faa0c60a805e5173459"
|
||||
config.ExtConfig.ProxyUrl = "http://127.0.0.1:7890"
|
||||
|
||||
helper.InitDefaultRedis("http://127.0.0.1:6379", "", 15) // 初始化配置
|
||||
|
||||
job := TransferJob{}
|
||||
|
||||
job.Exec(nil)
|
||||
}
|
||||
|
||||
// 测试状态任务
|
||||
func TestTransferStatusJob(t *testing.T) {
|
||||
dsn := "root:123456@tcp(127.0.0.1:3306)/eth_transfer?charset=utf8mb4&parseTime=True&loc=Local&timeout=1000ms"
|
||||
db, _ := gorm.Open(mysql.Open(dsn), &gorm.Config{})
|
||||
sdk.Runtime.SetDb("default", db)
|
||||
|
||||
config.ExtConfig.ApiEndpoint = "https://stylish-cool-fire.ethereum-sepolia.quiknode.pro/17572db4c091accfa5dc6faa0c60a805e5173459"
|
||||
config.ExtConfig.ProxyUrl = "http://127.0.0.1:7890"
|
||||
|
||||
job := TransferStatusJob{}
|
||||
|
||||
job.Exec(nil)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user