代码拉取完成,页面将自动刷新
package main
import (
"at-migrator-tool/internal"
col "at-migrator-tool/internal/collector"
"at-migrator-tool/internal/process"
"testing"
"time"
)
func TestGetAppConfig(t *testing.T) {
appC := getAppConfig()
t.Log(appC)
t.Log(appC.Migrator.OperateRecord.FetchStep)
t.Log(appC.Migrator.OperateRecord.MaxEmptyFetchNum)
t.Log(appC.Webhook.FsRobot)
}
func TestNoProcess(t *testing.T) {
appC := getAppConfig()
app := internal.NewApp(appC)
app.Go()
}
func TestRunHttp(t *testing.T) {
appC := getAppConfig()
app := internal.NewApp(appC)
http := process.NewHttp(app)
app.Add(http).
Go()
}
func TestFsRobotCollector(t *testing.T) {
appC := getAppConfig()
c := col.NewFsRobotCollector(3, appC.Webhook)
go c.Listen()
m := make(map[string]interface{})
m["msg_type"] = "text"
m["content"] = map[string]string{
"text": "[at-migrator-tool] func TestFsRobotCollector(t *testing.T)",
}
err := c.Put(m)
if err != nil {
t.Fatal(err)
}
time.Sleep(10 * time.Second)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。