feat: verify migration warnings when upgrading from Gitea

This commit is contained in:
Earl Warren 2024-12-22 12:48:09 +01:00
parent 32779c4d6d
commit 33d36a0e99
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -49,12 +49,22 @@ function test_successful_upgrades() {
done
}
function migration_assert() {
local work_path=$DIR/forgejo-work-path
local logfile=$work_path/log/forgejo.log
grep --quiet 'ORM engine initialization successful' $logfile
if grep --fixed-strings 'serveInstalled() [W] Table' $logfile; then
echo "unexpected warnings in database migration"
return 1
fi
}
function test_gitea_upgrades() {
local config=$UPGRADE_DIR/default-app.ini
(
echo gitea 1.21 forgejo 7.0
echo gitea 1.21 forgejo 9.0
echo gitea 1.22 forgejo 9.0
echo gitea 1.21 forgejo 10.0
echo gitea 1.22 forgejo 10.0
) | while read gitea gitea_version forgejo forgejo_version; do
log_info "upgrading from Gitea $gitea_version to Forgejo $forgejo_version"
stop
@ -74,6 +84,8 @@ function test_gitea_upgrades() {
verify_storage
fixture_assert
doctor_run $config
migration_assert
done
}