feat: 迁移渠道列表新增和游戏累计分布

This commit is contained in:
Yvan
2026-11-03 21:32:51 +08:00
parent 5e58c6bcf3
commit 075d94a51e
39 changed files with 2216 additions and 12 deletions
@@ -17,3 +17,14 @@ func TestLegacyPasswordFormats(t *testing.T) {
t.Fatal("缺少兼容盐时必须明确报错")
}
}
func TestNewChannelPasswordMatchesLegacyFixedVector(t *testing.T) {
passwords := &Passwords{AuthCode: "test-auth"}
hash, err := passwords.Encode("demo123")
if err != nil || hash != "###eef6d9b7160f32a869f3e03b7ea575a5" {
t.Fatal("新渠道密码与旧平台格式不兼容")
}
if _, err := (&Passwords{}).Encode("demo123"); err == nil {
t.Fatal("缺少盐不能写入不可登录的渠道密码")
}
}