mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-03 12:20:28 +08:00
修复若干测试用例
This commit is contained in:
@@ -34,14 +34,9 @@ func TestRPCClient_NodeRPC(t *testing.T) {
|
|||||||
|
|
||||||
func TestRPC_Dial_HTTP(t *testing.T) {
|
func TestRPC_Dial_HTTP(t *testing.T) {
|
||||||
client, err := NewRPCClient(&configs.APIConfig{
|
client, err := NewRPCClient(&configs.APIConfig{
|
||||||
RPC: struct {
|
RPCEndpoints: []string{"https://127.0.0.1:8003"},
|
||||||
Endpoints []string `yaml:"endpoints"`
|
NodeId: "a7e55782dab39bce0901058a1e14a0e6",
|
||||||
DisableUpdate bool `yaml:"disableUpdate"`
|
Secret: "lvyPobI3BszkJopz5nPTocOs0OLkEJ7y",
|
||||||
}{
|
|
||||||
Endpoints: []string{"http://127.0.0.1:8004"},
|
|
||||||
},
|
|
||||||
NodeId: "a7e55782dab39bce0901058a1e14a0e6",
|
|
||||||
Secret: "lvyPobI3BszkJopz5nPTocOs0OLkEJ7y",
|
|
||||||
}, true)
|
}, true)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
@@ -56,14 +51,9 @@ func TestRPC_Dial_HTTP(t *testing.T) {
|
|||||||
|
|
||||||
func TestRPC_Dial_HTTP_2(t *testing.T) {
|
func TestRPC_Dial_HTTP_2(t *testing.T) {
|
||||||
client, err := NewRPCClient(&configs.APIConfig{
|
client, err := NewRPCClient(&configs.APIConfig{
|
||||||
RPC: struct {
|
RPCEndpoints: []string{"https://127.0.0.1:8003"},
|
||||||
Endpoints []string `yaml:"endpoints"`
|
NodeId: "a7e55782dab39bce0901058a1e14a0e6",
|
||||||
DisableUpdate bool `yaml:"disableUpdate"`
|
Secret: "lvyPobI3BszkJopz5nPTocOs0OLkEJ7y",
|
||||||
}{
|
|
||||||
Endpoints: []string{"https://127.0.0.1:8003"},
|
|
||||||
},
|
|
||||||
NodeId: "a7e55782dab39bce0901058a1e14a0e6",
|
|
||||||
Secret: "lvyPobI3BszkJopz5nPTocOs0OLkEJ7y",
|
|
||||||
}, true)
|
}, true)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
@@ -78,14 +68,9 @@ func TestRPC_Dial_HTTP_2(t *testing.T) {
|
|||||||
|
|
||||||
func TestRPC_Dial_HTTPS(t *testing.T) {
|
func TestRPC_Dial_HTTPS(t *testing.T) {
|
||||||
client, err := NewRPCClient(&configs.APIConfig{
|
client, err := NewRPCClient(&configs.APIConfig{
|
||||||
RPC: struct {
|
RPCEndpoints: []string{"https://127.0.0.1:8004"},
|
||||||
Endpoints []string `yaml:"endpoints"`
|
NodeId: "a7e55782dab39bce0901058a1e14a0e6",
|
||||||
DisableUpdate bool `yaml:"disableUpdate"`
|
Secret: "lvyPobI3BszkJopz5nPTocOs0OLkEJ7y",
|
||||||
}{
|
|
||||||
Endpoints: []string{"https://127.0.0.1:8004"},
|
|
||||||
},
|
|
||||||
NodeId: "a7e55782dab39bce0901058a1e14a0e6",
|
|
||||||
Secret: "lvyPobI3BszkJopz5nPTocOs0OLkEJ7y",
|
|
||||||
}, true)
|
}, true)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
|||||||
Reference in New Issue
Block a user