mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-16 05:30:27 +08:00
实现缓存策略的部分功能
This commit is contained in:
22
internal/web/actions/default/nodes/nodeutils/utils_test.go
Normal file
22
internal/web/actions/default/nodes/nodeutils/utils_test.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package nodeutils
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/rpc"
|
||||
_ "github.com/iwind/TeaGo/bootstrap"
|
||||
"github.com/iwind/TeaGo/logs"
|
||||
"testing"
|
||||
)
|
||||
|
||||
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)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
logs.PrintAsJSON(results, t)
|
||||
}
|
||||
Reference in New Issue
Block a user