mirror of
https://github.com/alibaba/higress.git
synced 2026-05-27 14:17:27 +08:00
fix: Fix test cases in registry/nacos/mcpserver/watcher_test.go (#3869)
Signed-off-by: CH3CHO <ch3cho@qq.com>
This commit is contained in:
@@ -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"},
|
||||
|
||||
Reference in New Issue
Block a user