From 1afcd530602d6bd42a49fc5816f1be9133f36b30 Mon Sep 17 00:00:00 2001 From: shiyiyue1102 Date: Fri, 17 May 2024 10:37:38 +0800 Subject: [PATCH] mock Config proxy --- clients/config_client/config_client_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clients/config_client/config_client_test.go b/clients/config_client/config_client_test.go index c73c983d..dc86c068 100644 --- a/clients/config_client/config_client_test.go +++ b/clients/config_client/config_client_test.go @@ -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), @@ -81,6 +81,7 @@ func createConfigClientTestTls() *ConfigClient { _ = nc.SetClientConfig(*clientTLsConfigWithOptions) _ = nc.SetHttpAgent(&http_agent.HttpAgent{}) client, _ := NewConfigClient(&nc) + client.configProxy = &MockConfigProxy{} return client } @@ -90,6 +91,7 @@ func createConfigClientCommon() *ConfigClient { _ = nc.SetClientConfig(*clientConfigWithOptions) _ = nc.SetHttpAgent(&http_agent.HttpAgent{}) client, _ := NewConfigClient(&nc) + client.configProxy = &MockConfigProxy{} return client }