From 6bf109e7848a2d8b55bb3b14a997e431f4bbef8d Mon Sep 17 00:00:00 2001 From: Zyy Date: Mon, 30 Nov 2026 23:25:46 +0800 Subject: [PATCH] test(store): initialize configuration revision baseline Initialize configuration and settings revisions after test migrations so functional assertions remain independent of migration revision increments. Co-authored-by: Codex --- backend/crates/gateway-store/tests/postgres/mod.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/backend/crates/gateway-store/tests/postgres/mod.rs b/backend/crates/gateway-store/tests/postgres/mod.rs index 788f81b9c..9ffd53850 100644 --- a/backend/crates/gateway-store/tests/postgres/mod.rs +++ b/backend/crates/gateway-store/tests/postgres/mod.rs @@ -101,6 +101,15 @@ impl TestDatabase { .run(&pool) .await .expect("apply test migrations"); + // 功能测试从统一版本基线验证递增与回滚,不依赖数据迁移累计的版本 + sqlx::query( + "update runtime_settings + set config_revision = 1, settings_revision = 1, account_error_protection_revision = 1 + where id = 1", + ) + .execute(&pool) + .await + .expect("initialize test runtime settings revisions"); Some(Self { admin, pool,