Merge pull request 'feat: verify migration warnings when upgrading from Gitea' (#430) from earl-warren/end-to-end:wip-migration into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/430 Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
This commit is contained in:
commit
3de2a36f6c
1 changed files with 15 additions and 3 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue