From e6fc09b14f9a3672e20678455be7b2bb8f8c3837 Mon Sep 17 00:00:00 2001 From: Kent Dong Date: Mon, 25 May 2026 15:15:03 +0800 Subject: [PATCH] fix: Fix test cases in registry/nacos/mcpserver/watcher_test.go (#3869) Signed-off-by: CH3CHO --- registry/nacos/mcpserver/watcher_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/registry/nacos/mcpserver/watcher_test.go b/registry/nacos/mcpserver/watcher_test.go index 318a83f6..50b7ec95 100644 --- a/registry/nacos/mcpserver/watcher_test.go +++ b/registry/nacos/mcpserver/watcher_test.go @@ -134,6 +134,8 @@ func Test_Watcher(t *testing.T) { Ip: "127.0.0.1", Port: 8080, Metadata: map[string]string{"protocol": "http"}, + Enable: true, + Healthy: true, }, }, }, @@ -188,6 +190,7 @@ func Test_Watcher(t *testing.T) { Meta: config.Meta{ GroupVersionKind: gvk.ServiceEntry, Name: fmt.Sprintf("%s-%s", provider.IstioMcpAutoGeneratedSeName, strings.TrimSuffix(dataId, ".json")), + Namespace: "mcp", }, Spec: &v1alpha3.ServiceEntry{ Hosts: []string{"explore.DEFAULT-GROUP.public.nacos"}, @@ -266,6 +269,8 @@ func Test_Watcher(t *testing.T) { Ip: "example.com", Port: 8080, Metadata: map[string]string{"protocol": "http"}, + Enable: true, + Healthy: true, }, }, }, @@ -320,6 +325,7 @@ func Test_Watcher(t *testing.T) { Meta: config.Meta{ GroupVersionKind: gvk.ServiceEntry, Name: fmt.Sprintf("%s-%s", provider.IstioMcpAutoGeneratedSeName, strings.TrimSuffix(dataId, ".json")), + Namespace: "mcp", }, Spec: &v1alpha3.ServiceEntry{ Hosts: []string{"explore.DEFAULT-GROUP.public.nacos"}, @@ -422,6 +428,8 @@ func Test_Watcher(t *testing.T) { Ip: "example.com", Port: 8080, Metadata: map[string]string{"protocol": "https"}, + Enable: true, + Healthy: true, }, }, }, @@ -476,6 +484,7 @@ func Test_Watcher(t *testing.T) { Meta: config.Meta{ GroupVersionKind: gvk.ServiceEntry, Name: fmt.Sprintf("%s-%s", provider.IstioMcpAutoGeneratedSeName, strings.TrimSuffix(dataId, ".json")), + Namespace: "mcp", }, Spec: &v1alpha3.ServiceEntry{ Hosts: []string{"explore.DEFAULT-GROUP.public.nacos"},