|
|
@@ -17,10 +17,10 @@ func TestTenantConfigAPI_Simple(t *testing.T) {
|
|
17
|
17
|
// 1. 创建测试数据(赋值)
|
|
18
|
18
|
config := model.TenantConfig{
|
|
19
|
19
|
//ID: "zhx-1",
|
|
20
|
|
- AgentUrl: "http://localhost:8090/api",
|
|
|
20
|
+ AgentUrl: "http://localhost:9010/api",
|
|
21
|
21
|
AgentConcurrency: 50,
|
|
22
|
22
|
}
|
|
23
|
|
- config.ID = "zhx-2"
|
|
|
23
|
+ config.ID = "zhx-3"
|
|
24
|
24
|
|
|
25
|
25
|
fmt.Printf("测试数据: %v\n", config)
|
|
26
|
26
|
|
|
|
@@ -34,7 +34,7 @@ func TestTenantConfigAPI_Simple(t *testing.T) {
|
|
34
|
34
|
fmt.Printf("JSON数据: %s\n", string(jsonData))
|
|
35
|
35
|
|
|
36
|
36
|
// 3. 创建POST请求
|
|
37
|
|
- url := "http://localhost:9090/api/tenant/config" // 你的服务端口
|
|
|
37
|
+ url := "http://localhost:9010/api/tenant/config" // 你的服务端口
|
|
38
|
38
|
|
|
39
|
39
|
// 创建请求
|
|
40
|
40
|
req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
|