feat: 迁移渠道列表新增和游戏累计分布
This commit is contained in:
@@ -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("缺少盐不能写入不可登录的渠道密码")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user