Skip to content

Commit

Permalink
mock Config proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyiyue1102 committed May 17, 2024
1 parent cccb094 commit 1afcd53
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion clients/config_client/config_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
"github.com/stretchr/testify/assert"
)

var serverConfigWithOptions = constant.NewServerConfig("mse-xxx-p.nacos-ans.mse.aliyuncs.com", 8848)
var serverConfigWithOptions = constant.NewServerConfig("127.0.0.1", 8848)

var clientConfigWithOptions = constant.NewClientConfig(
constant.WithTimeoutMs(10*1000),
Expand Down Expand Up @@ -81,6 +81,7 @@ func createConfigClientTestTls() *ConfigClient {
_ = nc.SetClientConfig(*clientTLsConfigWithOptions)
_ = nc.SetHttpAgent(&http_agent.HttpAgent{})
client, _ := NewConfigClient(&nc)
client.configProxy = &MockConfigProxy{}
return client
}

Expand All @@ -90,6 +91,7 @@ func createConfigClientCommon() *ConfigClient {
_ = nc.SetClientConfig(*clientConfigWithOptions)
_ = nc.SetHttpAgent(&http_agent.HttpAgent{})
client, _ := NewConfigClient(&nc)
client.configProxy = &MockConfigProxy{}
return client
}

Expand Down

0 comments on commit 1afcd53

Please sign in to comment.