test: align channel creation actor with business permissions

This commit is contained in:
Yvan
2026-11-05 22:24:38 +08:00
parent 6a0d0210d4
commit 1bc2082718
+3 -2
View File
@@ -155,7 +155,8 @@ func TestChannelHTTPListsMetricsOptionsAndAtomicCreation(t *testing.T) {
t.Fatal("上级未获取下级正常绑定") t.Fatal("上级未获取下级正常绑定")
} }
body := `{"sourceDb":"lx","platformBusierId":"14","account":"中文渠道","password":"demo123","registerType":1}` body := `{"sourceDb":"lx","platformBusierId":"14","account":"中文渠道","password":"demo123","registerType":1}`
created := call(8, "POST", "/sw/promote", body, 0).(map[string]any) call(8, "POST", "/sw/promote", body, 7)
created := call(9, "POST", "/sw/promote", body, 0).(map[string]any)
if created["sourceDb"] != "lx" { if created["sourceDb"] != "lx" {
t.Fatal("返回平台丢失") t.Fatal("返回平台丢失")
} }
@@ -167,7 +168,7 @@ func TestChannelHTTPListsMetricsOptionsAndAtomicCreation(t *testing.T) {
if persisted.Status != -3 || persisted.PromoteLevel != 1 || persisted.Password != "###eef6d9b7160f32a869f3e03b7ea575a5" { if persisted.Status != -3 || persisted.PromoteLevel != 1 || persisted.Password != "###eef6d9b7160f32a869f3e03b7ea575a5" {
t.Fatalf("源平台创建不兼容: %+v", persisted) t.Fatalf("源平台创建不兼容: %+v", persisted)
} }
call(8, "POST", "/sw/promote", body, 7) call(9, "POST", "/sw/promote", body, 7)
call(99, "POST", "/sw/promote", body, 7) call(99, "POST", "/sw/promote", body, 7)
list(8, "", 2) list(8, "", 2)
call(8, "GET", "/sw/promote/game-distribution?sourceDb=hw&promoteId=100", "", 7) call(8, "GET", "/sw/promote/game-distribution?sourceDb=hw&promoteId=100", "", 7)