Files
EdgeAdmin/internal/web/actions/default/nodes/nodeutils/utils_test.go

24 lines
441 B
Go
Raw Normal View History

2020-10-04 14:27:05 +08:00
package nodeutils
import (
2024-07-27 15:42:58 +08:00
"testing"
2020-10-04 14:27:05 +08:00
"github.com/TeaOSLab/EdgeAdmin/internal/rpc"
_ "github.com/iwind/TeaGo/bootstrap"
"github.com/iwind/TeaGo/logs"
)
func TestSendMessageToCluster(t *testing.T) {
rpcClient, err := rpc.SharedRPC()
if err != nil {
t.Fatal(err)
}
ctx := rpcClient.Context(1)
results, err := SendMessageToCluster(ctx, 1, "test", nil, 30, false)
2020-10-04 14:27:05 +08:00
if err != nil {
t.Fatal(err)
}
logs.PrintAsJSON(results, t)
}