feat: verify migration warnings when upgrading from Gitea
This commit is contained in:
parent
32779c4d6d
commit
33d36a0e99
1 changed files with 15 additions and 3 deletions
|
@ -49,12 +49,22 @@ function test_successful_upgrades() {
|
||||||
done
|
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() {
|
function test_gitea_upgrades() {
|
||||||
local config=$UPGRADE_DIR/default-app.ini
|
local config=$UPGRADE_DIR/default-app.ini
|
||||||
(
|
(
|
||||||
echo gitea 1.21 forgejo 7.0
|
echo gitea 1.21 forgejo 10.0
|
||||||
echo gitea 1.21 forgejo 9.0
|
echo gitea 1.22 forgejo 10.0
|
||||||
echo gitea 1.22 forgejo 9.0
|
|
||||||
) | while read gitea gitea_version forgejo forgejo_version; do
|
) | while read gitea gitea_version forgejo forgejo_version; do
|
||||||
log_info "upgrading from Gitea $gitea_version to Forgejo $forgejo_version"
|
log_info "upgrading from Gitea $gitea_version to Forgejo $forgejo_version"
|
||||||
stop
|
stop
|
||||||
|
@ -74,6 +84,8 @@ function test_gitea_upgrades() {
|
||||||
verify_storage
|
verify_storage
|
||||||
fixture_assert
|
fixture_assert
|
||||||
doctor_run $config
|
doctor_run $config
|
||||||
|
|
||||||
|
migration_assert
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue