mirror of
https://gitee.com/mirrors/AllinSSL.git
synced 2026-03-08 15:51:11 +08:00
【新增】【通知】飞书群机器人通知类型
This commit is contained in:
28
backend/internal/report/feishu_test.go
Normal file
28
backend/internal/report/feishu_test.go
Normal 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")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user