不同地区提取合并自动配置

This commit is contained in:
2025-04-02 17:24:12 +08:00
parent 13794c2d27
commit 68e96793fe
3 changed files with 113 additions and 23 deletions

View File

@@ -475,6 +475,8 @@ func Test_channelService_CreateChannel(t *testing.T) {
wantErr: true,
wantErrContains: "端口数量不足",
},
// todo 跨天用量更新
// todo 多地区混杂条件提取
}
for _, tt := range tests {
@@ -510,14 +512,6 @@ func Test_channelService_CreateChannel(t *testing.T) {
return
}
// 检查返回地址格式
for _, addr := range got {
protocol := string(tt.args.protocol)
if !strings.HasPrefix(addr, protocol+"://") {
t.Errorf("CreateChannel() 地址 %v 不是有效的 %s 地址", addr, protocol)
}
}
// 查询创建的通道
var channels []models.Channel
db.Where(