fix: upgrade: add missing check for migration warnings and errors

Refs: https://codeberg.org/forgejo/forgejo/issues/6583
This commit is contained in:
Earl Warren 2025-01-17 02:22:12 +01:00
parent 925c936032
commit f8d5ecb47b
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -57,6 +57,10 @@ function migration_assert() {
grep --quiet 'ORM engine initialization successful' $logfile
if grep 'serveInstalled() \[[EW]\] Table' $logfile; then
echo "unexpected warnings in database initialization"
return 1
fi
if grep 'Migrate() \[[EW]\]' $logfile; then
echo "unexpected warnings in database migration"
return 1
fi
@ -64,6 +68,8 @@ function migration_assert() {
function test_gitea_upgrades() {
local config=$UPGRADE_DIR/default-app.ini
# The Forgejo target migration version must be 10.0 because it is the last supported.
# https://forgejo.org/2024-12-gitea-compatibility/
(
echo gitea 1.21 forgejo 10.0
echo gitea 1.22 forgejo 10.0