test(M01-B): 验证MySQL迁移往返
This commit is contained in:
@@ -17,7 +17,9 @@ $requiredFiles = @(
|
||||
"backend/tests/migration-contract.test.mjs",
|
||||
"backend/tests/mysql-pool-contract.test.mjs",
|
||||
"backend/tests/migration-runner.test.mjs",
|
||||
"backend/tests/mysql-migration-roundtrip.test.mjs",
|
||||
"backend/tests/legacy-read-repository.test.mjs",
|
||||
"scripts/dev/wsl/mysql-migration-roundtrip.sh",
|
||||
"database/migrations/2026061601_m01b_core_schema.up.sql",
|
||||
"database/migrations/2026061601_m01b_core_schema.down.sql",
|
||||
"database/migrations/2026061601_m01b_core_schema.verify.sql",
|
||||
@@ -31,6 +33,11 @@ foreach ($path in $requiredFiles) {
|
||||
}
|
||||
}
|
||||
|
||||
$packageJson = Get-Content "backend/package.json" -Raw | ConvertFrom-Json
|
||||
if (-not $packageJson.scripts.'test:mysql:migration') {
|
||||
throw "backend/package.json is missing test:mysql:migration"
|
||||
}
|
||||
|
||||
& npm --prefix backend test
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "backend contract test failed"
|
||||
|
||||
Reference in New Issue
Block a user