EasyAudioEncode/pkg/pluginheart/plugin_test.go
2025-12-25 17:01:46 +08:00

28 lines
506 B
Go

package pluginheart
import (
"fmt"
"testing"
"time"
)
func TestHeart(t *testing.T) {
e := NewEngine("easyntd", "http://localhost:10000")
_, err := e.Heart(HeartInput{
API: "http://localhost:10000",
})
if err != nil {
t.Fatal(err)
}
}
func TestConsole(t *testing.T) {
e := NewEngine("easyntd", "http://localhost:10000")
_, err := e.Console(ConsoleInput{
Msg: fmt.Sprintf("%s 发生了什么 name=%s", time.Now().Format(time.DateTime), "easyntd"),
})
if err != nil {
t.Fatal(err)
}
}