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) } }