From 4334b6f14879ff32b5885abee4ec6657d5b906e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Fri, 24 Nov 2023 09:13:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=8B=A5=E5=B9=B2=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/rpc/rpc_client_test.go | 33 +++++++++------------------------ 1 file changed, 9 insertions(+), 24 deletions(-) diff --git a/internal/rpc/rpc_client_test.go b/internal/rpc/rpc_client_test.go index 0c1076a6..bbeea1d5 100644 --- a/internal/rpc/rpc_client_test.go +++ b/internal/rpc/rpc_client_test.go @@ -34,14 +34,9 @@ func TestRPCClient_NodeRPC(t *testing.T) { func TestRPC_Dial_HTTP(t *testing.T) { client, err := NewRPCClient(&configs.APIConfig{ - RPC: struct { - Endpoints []string `yaml:"endpoints"` - DisableUpdate bool `yaml:"disableUpdate"` - }{ - Endpoints: []string{"http://127.0.0.1:8004"}, - }, - NodeId: "a7e55782dab39bce0901058a1e14a0e6", - Secret: "lvyPobI3BszkJopz5nPTocOs0OLkEJ7y", + RPCEndpoints: []string{"https://127.0.0.1:8003"}, + NodeId: "a7e55782dab39bce0901058a1e14a0e6", + Secret: "lvyPobI3BszkJopz5nPTocOs0OLkEJ7y", }, true) if err != nil { t.Fatal(err) @@ -56,14 +51,9 @@ func TestRPC_Dial_HTTP(t *testing.T) { func TestRPC_Dial_HTTP_2(t *testing.T) { client, err := NewRPCClient(&configs.APIConfig{ - RPC: struct { - Endpoints []string `yaml:"endpoints"` - DisableUpdate bool `yaml:"disableUpdate"` - }{ - Endpoints: []string{"https://127.0.0.1:8003"}, - }, - NodeId: "a7e55782dab39bce0901058a1e14a0e6", - Secret: "lvyPobI3BszkJopz5nPTocOs0OLkEJ7y", + RPCEndpoints: []string{"https://127.0.0.1:8003"}, + NodeId: "a7e55782dab39bce0901058a1e14a0e6", + Secret: "lvyPobI3BszkJopz5nPTocOs0OLkEJ7y", }, true) if err != nil { t.Fatal(err) @@ -78,14 +68,9 @@ func TestRPC_Dial_HTTP_2(t *testing.T) { func TestRPC_Dial_HTTPS(t *testing.T) { client, err := NewRPCClient(&configs.APIConfig{ - RPC: struct { - Endpoints []string `yaml:"endpoints"` - DisableUpdate bool `yaml:"disableUpdate"` - }{ - Endpoints: []string{"https://127.0.0.1:8004"}, - }, - NodeId: "a7e55782dab39bce0901058a1e14a0e6", - Secret: "lvyPobI3BszkJopz5nPTocOs0OLkEJ7y", + RPCEndpoints: []string{"https://127.0.0.1:8004"}, + NodeId: "a7e55782dab39bce0901058a1e14a0e6", + Secret: "lvyPobI3BszkJopz5nPTocOs0OLkEJ7y", }, true) if err != nil { t.Fatal(err)