package msg import ( "fmt" "testing" "wss-pool/config" "wss-pool/internal/data" red "wss-pool/internal/redis" ) func TestCreateRandCode(t *testing.T) { fmt.Println("生成短信编号:", CreateRandCode()) } func TestCreateRandCodeTest(t *testing.T) { fmt.Println("生成发送者编号:", CreateRandCodeTest()) } func TestRun(t *testing.T) { red.RedisClient = red.RedisInit(config.Config.Redis.DbTen) data.InitMysql(config.Config.Bourse) code, err := RunSendSms("6001155042087") if err != nil { fmt.Println("发送短信失败:", err) return } fmt.Println("发送短信成功......", code) }