fix: validate explicit migrations and preserve large business ids
This commit is contained in:
@@ -180,7 +180,7 @@ func TestChannelPortraitHTTPTotalTiersAndScope(t *testing.T) {
|
||||
}
|
||||
data = call(7, "sourceDb=lx&promoteId=101&period=last7", 0)
|
||||
basic = data["basic"].(map[string]any)
|
||||
if basic["parentPromoteId"] != float64(100) || basic["parentPromoteName"] != "root-account" || basic["lastLoginTime"] != nil {
|
||||
if basic["parentPromoteId"] != "100" || basic["parentPromoteName"] != "root-account" || basic["lastLoginTime"] != nil {
|
||||
t.Fatal("上级应读同平台当前账号,不能沿用旧快照名")
|
||||
}
|
||||
call(99, "sourceDb=lx&promoteId=100", 7)
|
||||
@@ -189,7 +189,7 @@ func TestChannelPortraitHTTPTotalTiersAndScope(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
data = call(7, "sourceDb=lx&promoteId=100", 0)
|
||||
if data["available"] != false || data["metrics"] != nil || data["basic"].(map[string]any)["promoteId"] != float64(100) {
|
||||
if data["available"] != false || data["metrics"] != nil || data["basic"].(map[string]any)["promoteId"] != "100" {
|
||||
t.Fatal("缺数据时应保留已授权基本资料并标明未知")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user