test: 更新登录锁定表初始化断言
This commit is contained in:
@@ -13,11 +13,11 @@ func TestEnsureIMAdminGovernanceTablesUsesSelectedTenantDatabase(t *testing.T) {
|
|||||||
if err := ensureIMAdminGovernanceTables(exec); err != nil {
|
if err := ensureIMAdminGovernanceTables(exec); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
if len(exec.statements) != 4 {
|
if len(exec.statements) != 5 {
|
||||||
t.Fatalf("created %d admin governance tables, want 4", len(exec.statements))
|
t.Fatalf("created %d admin governance tables, want 5", len(exec.statements))
|
||||||
}
|
}
|
||||||
joined := strings.ToLower(strings.Join(exec.statements, "\n"))
|
joined := strings.ToLower(strings.Join(exec.statements, "\n"))
|
||||||
for _, table := range []string{"im_user_login_logs", "im_login_failure_logs", "im_message_admin_actions", "im_user_ip_whitelists"} {
|
for _, table := range []string{"im_user_login_logs", "im_login_failure_logs", "im_login_lockouts", "im_message_admin_actions", "im_user_ip_whitelists"} {
|
||||||
if !strings.Contains(joined, table) {
|
if !strings.Contains(joined, table) {
|
||||||
t.Fatalf("missing table %s", table)
|
t.Fatalf("missing table %s", table)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user