feat(规则): 支持名称代号,便于区分和管理
创建与更新规则时必填全局唯一 name,已有规则迁移回填为 rule-{id}。
This commit is contained in:
@@ -116,6 +116,7 @@ func setupFixture(t *testing.T) *fixture {
|
||||
})
|
||||
|
||||
rule := mustAdminJSON(t, client, base, adminKey, http.MethodPost, "/api/v1/rules", map[string]any{
|
||||
"name": "e2e-rule-" + suffix,
|
||||
"source_name": f.srcName,
|
||||
"event": "trade.open",
|
||||
"template_name": tmplName,
|
||||
@@ -361,6 +362,7 @@ func TestNotifyFlow_DifferentTemplatesPerRule(t *testing.T) {
|
||||
})
|
||||
|
||||
rule := mustAdminJSON(t, client, base, adminKey, http.MethodPost, "/api/v1/rules", map[string]any{
|
||||
"name": "e2e-rule-" + r.event + "-" + suffix,
|
||||
"source_name": srcName,
|
||||
"event": r.event,
|
||||
"template_name": tmplName,
|
||||
|
||||
Reference in New Issue
Block a user