test: 更新登录锁定表初始化断言

This commit is contained in:
richjohnrambo
2026-09-21 09:55:29 +08:00
parent e3b93113f1
commit c891afba73
@@ -13,11 +13,11 @@ func TestEnsureIMAdminGovernanceTablesUsesSelectedTenantDatabase(t *testing.T) {
if err := ensureIMAdminGovernanceTables(exec); err != nil {
t.Fatal(err)
}
if len(exec.statements) != 4 {
t.Fatalf("created %d admin governance tables, want 4", len(exec.statements))
if len(exec.statements) != 5 {
t.Fatalf("created %d admin governance tables, want 5", len(exec.statements))
}
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) {
t.Fatalf("missing table %s", table)
}