【新增】【通知】飞书群机器人通知类型

This commit is contained in:
wantoper
2025-05-28 17:42:01 +08:00
parent ae558a7212
commit 5e874e65f8
3 changed files with 138 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
package report
import (
"testing"
)
func TestFeishuSend(test *testing.T) {
report := NewFeishuReport("", "")
err := report.SendText("test msg")
if err != nil {
test.Errorf("FeishuSend failed: %v", err)
}
}
func TestNotifyFeishu(test *testing.T) {
params := map[string]any{
"provider_id": "3",
"body": "测试消息通道",
"subject": "测试消息通道",
}
err := NotifyFeishu(params)
if err != nil {
test.Error("NotifyWebHook failed", "error", err)
} else {
test.Log("NotifyWebHook success")
}
}