1 Star 1 Fork 0

AdamTyn / at-migrator-tool

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
main_test.go 986 Bytes
一键复制 编辑 原始数据 按行查看 历史
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)
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/adamtyn/at-migrator-tool.git
git@gitee.com:adamtyn/at-migrator-tool.git
adamtyn
at-migrator-tool
at-migrator-tool
main

搜索帮助

344bd9b3 5694891 D2dac590 5694891