upgrades: split v1.20 & database v3 tests in separate files
This commit is contained in:
parent
be86fe2e44
commit
b011f038aa
3 changed files with 257 additions and 244 deletions
223
forgejo/upgrades/test-upgrade-1.20-storage.sh
Normal file
223
forgejo/upgrades/test-upgrade-1.20-storage.sh
Normal file
|
@ -0,0 +1,223 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
function test_downgrade_1.20.2_fails() {
|
||||||
|
local work_path=$DIR/forgejo-work-path
|
||||||
|
|
||||||
|
log_info "See also https://codeberg.org/forgejo/forgejo/pulls/1225"
|
||||||
|
|
||||||
|
log_info "downgrading from 1.20.3-0 to 1.20.2-0 fails"
|
||||||
|
stop
|
||||||
|
reset default
|
||||||
|
start 1.20.3-0
|
||||||
|
stop
|
||||||
|
download 1.20.2-0
|
||||||
|
timeout 60 $DIR/forgejo-1.20.2-0 --config $work_path/app.ini --work-path $work_path || true
|
||||||
|
if ! grep --fixed-strings --quiet 'use the newer database' $work_path/log/forgejo.log ; then
|
||||||
|
cat $work_path/log/forgejo.log
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_bug_storage_merged() {
|
||||||
|
local work_path=$DIR/forgejo-work-path
|
||||||
|
|
||||||
|
log_info "See also https://codeberg.org/forgejo/forgejo/pulls/1225"
|
||||||
|
|
||||||
|
log_info "using < 1.20.3-0 and [storage].PATH merge all storage"
|
||||||
|
for version in 1.18.5-0 1.19.4-0 1.20.2-0 ; do
|
||||||
|
stop
|
||||||
|
reset merged
|
||||||
|
start $version
|
||||||
|
for path in ${STORAGE_PATHS} ; do
|
||||||
|
! test -d $work_path/data/$path
|
||||||
|
done
|
||||||
|
for path in ${STORAGE_PATHS} ; do
|
||||||
|
! test -d $work_path/merged/$path
|
||||||
|
done
|
||||||
|
test -d $work_path/merged
|
||||||
|
done
|
||||||
|
stop
|
||||||
|
|
||||||
|
log_info "upgrading from 1.20.2-0 with [storage].PATH fails"
|
||||||
|
download 1.20.3-0
|
||||||
|
timeout 60 $DIR/forgejo-1.20.3-0 --config $work_path/app.ini --work-path $work_path || true
|
||||||
|
if ! grep --fixed-strings --quiet '[storage].PATH is set and may create storage issues' $work_path/log/forgejo.log ; then
|
||||||
|
cat $work_path/log/forgejo.log
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_bug_storage_relative_path() {
|
||||||
|
local work_path=$DIR/forgejo-work-path
|
||||||
|
|
||||||
|
log_info "using < 1.20.3-0 legacy [server].XXXX and [picture].XXXX are relative to WORK_PATH"
|
||||||
|
for version in 1.18.5-0 1.19.4-0 1.20.2-0 ; do
|
||||||
|
stop
|
||||||
|
reset legagy-relative
|
||||||
|
start $version
|
||||||
|
test -d $work_path/relative-lfs
|
||||||
|
test -d $work_path/relative-avatars
|
||||||
|
test -d $work_path/relative-repo-avatars
|
||||||
|
done
|
||||||
|
|
||||||
|
log_info "using >= 1.20.3-0 legacy [server].XXXX and [picture].XXXX are relative to APP_DATA_PATH"
|
||||||
|
for version in 1.20.3-0 1.21.0-5-rc2 ; do
|
||||||
|
stop
|
||||||
|
reset legagy-relative
|
||||||
|
start $version
|
||||||
|
test -d $work_path/data/relative-lfs
|
||||||
|
test -d $work_path/data/relative-avatars
|
||||||
|
test -d $work_path/data/relative-repo-avatars
|
||||||
|
done
|
||||||
|
|
||||||
|
log_info "using >= 1.20.3-0 relative [storage.XXXX].PATHS are relative to APP_DATA_PATH"
|
||||||
|
for version in 1.20.3-0 1.21.0-5-rc2 ; do
|
||||||
|
stop
|
||||||
|
reset storage-relative
|
||||||
|
start $version
|
||||||
|
for path in ${STORAGE_PATHS} ; do
|
||||||
|
test -d $work_path/data/relative-$path
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
log_info "using 1.20.[12]-0 relative [storage.XXXX].PATHS are inconsistent"
|
||||||
|
for version in 1.20.2-0 ; do
|
||||||
|
stop
|
||||||
|
reset storage-relative
|
||||||
|
start $version
|
||||||
|
test -d $work_path/data/packages
|
||||||
|
test -d $work_path/relative-repo-archive
|
||||||
|
test -d $work_path/relative-attachments
|
||||||
|
test -d $work_path/relative-lfs
|
||||||
|
test -d $work_path/data/avatars
|
||||||
|
test -d $work_path/data/repo-avatars
|
||||||
|
done
|
||||||
|
|
||||||
|
log_info "using < 1.20 relative [storage.XXXX].PATHS are inconsistent"
|
||||||
|
for version in 1.18.5-0 1.19.4-0 ; do
|
||||||
|
stop
|
||||||
|
reset storage-relative
|
||||||
|
start $version
|
||||||
|
test -d $work_path/relative-packages
|
||||||
|
test -d $work_path/relative-repo-archive
|
||||||
|
test -d $work_path/relative-attachments
|
||||||
|
test -d $work_path/data/lfs
|
||||||
|
test -d $work_path/data/avatars
|
||||||
|
test -d $work_path/data/repo-avatars
|
||||||
|
done
|
||||||
|
|
||||||
|
log_info "using < 1.20.3-0 relative [XXXX].PATHS are relative to WORK_PATH"
|
||||||
|
for version in 1.18.5-0 1.19.4-0 1.20.2-0 ; do
|
||||||
|
stop
|
||||||
|
reset relative
|
||||||
|
start $version
|
||||||
|
for path in ${STORAGE_PATHS} ; do
|
||||||
|
test -d $work_path/relative-$path
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
log_info "using >= 1.20.3-0 relative [XXXX].PATHS are relative to APP_DATA_PATH"
|
||||||
|
for version in 1.20.3-0 1.21.0-5-rc2 ; do
|
||||||
|
stop
|
||||||
|
reset relative
|
||||||
|
start $version
|
||||||
|
for path in ${STORAGE_PATHS} ; do
|
||||||
|
test -d $work_path/data/relative-$path
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
stop
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_bug_storage_s3_misplace() {
|
||||||
|
local work_path=$DIR/forgejo-work-path
|
||||||
|
local s3_backend=${2:-minio}
|
||||||
|
|
||||||
|
log_info "See also https://codeberg.org/forgejo/forgejo/issues/1338"
|
||||||
|
|
||||||
|
for version in 1.20.2-0 1.20.3-0 ; do
|
||||||
|
log_info "Forgejo $version & $s3_backend"
|
||||||
|
stop
|
||||||
|
reset misplace-s3
|
||||||
|
start $version $s3_backend
|
||||||
|
fixture_create
|
||||||
|
for fun in ${STORAGE_FUN} ; do
|
||||||
|
fixture_${fun}_assert_s3
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
for version in 1.18.5-0 1.19.4-0 ; do
|
||||||
|
log_info "Forgejo $version & $s3_backend"
|
||||||
|
stop
|
||||||
|
reset misplace-s3
|
||||||
|
start $version $s3_backend
|
||||||
|
fixture_create
|
||||||
|
#
|
||||||
|
# some storage are in S3
|
||||||
|
#
|
||||||
|
fixture_attachments_assert_s3
|
||||||
|
fixture_lfs_assert_s3
|
||||||
|
#
|
||||||
|
# others are in local
|
||||||
|
#
|
||||||
|
fixture_repo_archive_assert_local elsewhere/repo-archive
|
||||||
|
fixture_avatars_assert_local elsewhere/avatars
|
||||||
|
fixture_packages_assert_local elsewhere/packages
|
||||||
|
fixture_repo_avatars_assert_local elsewhere/repo-avatars
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_bug_storage_misplace() {
|
||||||
|
local work_path=$DIR/forgejo-work-path
|
||||||
|
|
||||||
|
log_info "See also https://codeberg.org/forgejo/forgejo/pulls/1225"
|
||||||
|
|
||||||
|
log_info "using < 1.20 and conflicting sections misplace storage"
|
||||||
|
for version in 1.18.5-0 1.19.4-0 ; do
|
||||||
|
stop
|
||||||
|
reset misplace
|
||||||
|
start $version
|
||||||
|
#
|
||||||
|
# some storage are where they should be
|
||||||
|
#
|
||||||
|
test -d $work_path/data/packages
|
||||||
|
test -d $work_path/data/repo-archive
|
||||||
|
test -d $work_path/data/attachments
|
||||||
|
#
|
||||||
|
# others are under APP_DATA_PATH
|
||||||
|
#
|
||||||
|
test -d $work_path/elsewhere/lfs
|
||||||
|
test -d $work_path/elsewhere/avatars
|
||||||
|
test -d $work_path/elsewhere/repo-avatars
|
||||||
|
done
|
||||||
|
|
||||||
|
log_info "using < 1.20.[12]-0 and conflicting sections ignores [storage.*]"
|
||||||
|
for version in 1.20.2-0 ; do
|
||||||
|
stop
|
||||||
|
reset misplace
|
||||||
|
start $version
|
||||||
|
for path in ${STORAGE_PATHS} ; do
|
||||||
|
test -d $work_path/elsewhere/$path
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
stop
|
||||||
|
|
||||||
|
log_info "upgrading from 1.20.2-0 with conflicting sections fails"
|
||||||
|
download 1.20.3-0
|
||||||
|
timeout 60 $DIR/forgejo-1.20.3-0 --config $work_path/app.ini --work-path $work_path || true
|
||||||
|
for path in ${STORAGE_PATHS} ; do
|
||||||
|
if ! grep --fixed-strings --quiet "[storage.$path] may conflict" $work_path/log/forgejo.log ; then
|
||||||
|
cat $work_path/log/forgejo.log
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_upgrade_1_20_storage() {
|
||||||
|
run test_bug_storage_misplace
|
||||||
|
run test_bug_storage_merged
|
||||||
|
run test_downgrade_1.20.2_fails
|
||||||
|
run test_bug_storage_s3_misplace
|
||||||
|
}
|
28
forgejo/upgrades/test-upgrade-forgejo-database-v3.sh
Normal file
28
forgejo/upgrades/test-upgrade-forgejo-database-v3.sh
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
function test_forgejo_database_v3_upgrades_list_table() {
|
||||||
|
local table=$1
|
||||||
|
local work_path=$DIR/forgejo-work-path
|
||||||
|
|
||||||
|
sqlite3 $work_path/forgejo.db ".tables $table" .exit | grep --quiet $table
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_forgejo_database_v3_upgrades() {
|
||||||
|
local table=forgejo_auth_token
|
||||||
|
|
||||||
|
stop
|
||||||
|
|
||||||
|
reset default
|
||||||
|
log_info "run 1.20.4-1"
|
||||||
|
start 1.20.4-1
|
||||||
|
stop
|
||||||
|
! test_forgejo_database_v3_upgrades_list_table $table
|
||||||
|
test_forgejo_database_version 2
|
||||||
|
|
||||||
|
log_info "run 1.20.5-0"
|
||||||
|
start 1.20.5-0
|
||||||
|
stop
|
||||||
|
test_forgejo_database_v3_upgrades_list_table $table
|
||||||
|
test_forgejo_database_version 3
|
||||||
|
}
|
|
@ -335,173 +335,6 @@ function cleanup_storage() {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
function test_downgrade_1.20.2_fails() {
|
|
||||||
local work_path=$DIR/forgejo-work-path
|
|
||||||
|
|
||||||
log_info "See also https://codeberg.org/forgejo/forgejo/pulls/1225"
|
|
||||||
|
|
||||||
log_info "downgrading from 1.20.3-0 to 1.20.2-0 fails"
|
|
||||||
stop
|
|
||||||
reset default
|
|
||||||
start 1.20.3-0
|
|
||||||
stop
|
|
||||||
download 1.20.2-0
|
|
||||||
timeout 60 $DIR/forgejo-1.20.2-0 --config $work_path/app.ini --work-path $work_path || true
|
|
||||||
if ! grep --fixed-strings --quiet 'use the newer database' $work_path/log/forgejo.log ; then
|
|
||||||
cat $work_path/log/forgejo.log
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function test_bug_storage_merged() {
|
|
||||||
local work_path=$DIR/forgejo-work-path
|
|
||||||
|
|
||||||
log_info "See also https://codeberg.org/forgejo/forgejo/pulls/1225"
|
|
||||||
|
|
||||||
log_info "using < 1.20.3-0 and [storage].PATH merge all storage"
|
|
||||||
for version in 1.18.5-0 1.19.4-0 1.20.2-0 ; do
|
|
||||||
stop
|
|
||||||
reset merged
|
|
||||||
start $version
|
|
||||||
for path in ${STORAGE_PATHS} ; do
|
|
||||||
! test -d $work_path/data/$path
|
|
||||||
done
|
|
||||||
for path in ${STORAGE_PATHS} ; do
|
|
||||||
! test -d $work_path/merged/$path
|
|
||||||
done
|
|
||||||
test -d $work_path/merged
|
|
||||||
done
|
|
||||||
stop
|
|
||||||
|
|
||||||
log_info "upgrading from 1.20.2-0 with [storage].PATH fails"
|
|
||||||
download 1.20.3-0
|
|
||||||
timeout 60 $DIR/forgejo-1.20.3-0 --config $work_path/app.ini --work-path $work_path || true
|
|
||||||
if ! grep --fixed-strings --quiet '[storage].PATH is set and may create storage issues' $work_path/log/forgejo.log ; then
|
|
||||||
cat $work_path/log/forgejo.log
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function test_bug_storage_relative_path() {
|
|
||||||
local work_path=$DIR/forgejo-work-path
|
|
||||||
|
|
||||||
log_info "using < 1.20.3-0 legacy [server].XXXX and [picture].XXXX are relative to WORK_PATH"
|
|
||||||
for version in 1.18.5-0 1.19.4-0 1.20.2-0 ; do
|
|
||||||
stop
|
|
||||||
reset legagy-relative
|
|
||||||
start $version
|
|
||||||
test -d $work_path/relative-lfs
|
|
||||||
test -d $work_path/relative-avatars
|
|
||||||
test -d $work_path/relative-repo-avatars
|
|
||||||
done
|
|
||||||
|
|
||||||
log_info "using >= 1.20.3-0 legacy [server].XXXX and [picture].XXXX are relative to APP_DATA_PATH"
|
|
||||||
for version in 1.20.3-0 1.21.0-5-rc2 ; do
|
|
||||||
stop
|
|
||||||
reset legagy-relative
|
|
||||||
start $version
|
|
||||||
test -d $work_path/data/relative-lfs
|
|
||||||
test -d $work_path/data/relative-avatars
|
|
||||||
test -d $work_path/data/relative-repo-avatars
|
|
||||||
done
|
|
||||||
|
|
||||||
log_info "using >= 1.20.3-0 relative [storage.XXXX].PATHS are relative to APP_DATA_PATH"
|
|
||||||
for version in 1.20.3-0 1.21.0-5-rc2 ; do
|
|
||||||
stop
|
|
||||||
reset storage-relative
|
|
||||||
start $version
|
|
||||||
for path in ${STORAGE_PATHS} ; do
|
|
||||||
test -d $work_path/data/relative-$path
|
|
||||||
done
|
|
||||||
done
|
|
||||||
|
|
||||||
log_info "using 1.20.[12]-0 relative [storage.XXXX].PATHS are inconsistent"
|
|
||||||
for version in 1.20.2-0 ; do
|
|
||||||
stop
|
|
||||||
reset storage-relative
|
|
||||||
start $version
|
|
||||||
test -d $work_path/data/packages
|
|
||||||
test -d $work_path/relative-repo-archive
|
|
||||||
test -d $work_path/relative-attachments
|
|
||||||
test -d $work_path/relative-lfs
|
|
||||||
test -d $work_path/data/avatars
|
|
||||||
test -d $work_path/data/repo-avatars
|
|
||||||
done
|
|
||||||
|
|
||||||
log_info "using < 1.20 relative [storage.XXXX].PATHS are inconsistent"
|
|
||||||
for version in 1.18.5-0 1.19.4-0 ; do
|
|
||||||
stop
|
|
||||||
reset storage-relative
|
|
||||||
start $version
|
|
||||||
test -d $work_path/relative-packages
|
|
||||||
test -d $work_path/relative-repo-archive
|
|
||||||
test -d $work_path/relative-attachments
|
|
||||||
test -d $work_path/data/lfs
|
|
||||||
test -d $work_path/data/avatars
|
|
||||||
test -d $work_path/data/repo-avatars
|
|
||||||
done
|
|
||||||
|
|
||||||
log_info "using < 1.20.3-0 relative [XXXX].PATHS are relative to WORK_PATH"
|
|
||||||
for version in 1.18.5-0 1.19.4-0 1.20.2-0 ; do
|
|
||||||
stop
|
|
||||||
reset relative
|
|
||||||
start $version
|
|
||||||
for path in ${STORAGE_PATHS} ; do
|
|
||||||
test -d $work_path/relative-$path
|
|
||||||
done
|
|
||||||
done
|
|
||||||
|
|
||||||
log_info "using >= 1.20.3-0 relative [XXXX].PATHS are relative to APP_DATA_PATH"
|
|
||||||
for version in 1.20.3-0 1.21.0-5-rc2 ; do
|
|
||||||
stop
|
|
||||||
reset relative
|
|
||||||
start $version
|
|
||||||
for path in ${STORAGE_PATHS} ; do
|
|
||||||
test -d $work_path/data/relative-$path
|
|
||||||
done
|
|
||||||
done
|
|
||||||
|
|
||||||
stop
|
|
||||||
}
|
|
||||||
|
|
||||||
function test_bug_storage_s3_misplace() {
|
|
||||||
local work_path=$DIR/forgejo-work-path
|
|
||||||
local s3_backend=${2:-minio}
|
|
||||||
|
|
||||||
log_info "See also https://codeberg.org/forgejo/forgejo/issues/1338"
|
|
||||||
|
|
||||||
for version in 1.20.2-0 1.20.3-0 ; do
|
|
||||||
log_info "Forgejo $version & $s3_backend"
|
|
||||||
stop
|
|
||||||
reset misplace-s3
|
|
||||||
start $version $s3_backend
|
|
||||||
fixture_create
|
|
||||||
for fun in ${STORAGE_FUN} ; do
|
|
||||||
fixture_${fun}_assert_s3
|
|
||||||
done
|
|
||||||
done
|
|
||||||
|
|
||||||
for version in 1.18.5-0 1.19.4-0 ; do
|
|
||||||
log_info "Forgejo $version & $s3_backend"
|
|
||||||
stop
|
|
||||||
reset misplace-s3
|
|
||||||
start $version $s3_backend
|
|
||||||
fixture_create
|
|
||||||
#
|
|
||||||
# some storage are in S3
|
|
||||||
#
|
|
||||||
fixture_attachments_assert_s3
|
|
||||||
fixture_lfs_assert_s3
|
|
||||||
#
|
|
||||||
# others are in local
|
|
||||||
#
|
|
||||||
fixture_repo_archive_assert_local elsewhere/repo-archive
|
|
||||||
fixture_avatars_assert_local elsewhere/avatars
|
|
||||||
fixture_packages_assert_local elsewhere/packages
|
|
||||||
fixture_repo_avatars_assert_local elsewhere/repo-avatars
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
function test_storage_stable_s3() {
|
function test_storage_stable_s3() {
|
||||||
local work_path=$DIR/forgejo-work-path
|
local work_path=$DIR/forgejo-work-path
|
||||||
local s3_backend=${1:-minio}
|
local s3_backend=${1:-minio}
|
||||||
|
@ -520,53 +353,6 @@ function test_storage_stable_s3() {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
function test_bug_storage_misplace() {
|
|
||||||
local work_path=$DIR/forgejo-work-path
|
|
||||||
|
|
||||||
log_info "See also https://codeberg.org/forgejo/forgejo/pulls/1225"
|
|
||||||
|
|
||||||
log_info "using < 1.20 and conflicting sections misplace storage"
|
|
||||||
for version in 1.18.5-0 1.19.4-0 ; do
|
|
||||||
stop
|
|
||||||
reset misplace
|
|
||||||
start $version
|
|
||||||
#
|
|
||||||
# some storage are where they should be
|
|
||||||
#
|
|
||||||
test -d $work_path/data/packages
|
|
||||||
test -d $work_path/data/repo-archive
|
|
||||||
test -d $work_path/data/attachments
|
|
||||||
#
|
|
||||||
# others are under APP_DATA_PATH
|
|
||||||
#
|
|
||||||
test -d $work_path/elsewhere/lfs
|
|
||||||
test -d $work_path/elsewhere/avatars
|
|
||||||
test -d $work_path/elsewhere/repo-avatars
|
|
||||||
done
|
|
||||||
|
|
||||||
log_info "using < 1.20.[12]-0 and conflicting sections ignores [storage.*]"
|
|
||||||
for version in 1.20.2-0 ; do
|
|
||||||
stop
|
|
||||||
reset misplace
|
|
||||||
start $version
|
|
||||||
for path in ${STORAGE_PATHS} ; do
|
|
||||||
test -d $work_path/elsewhere/$path
|
|
||||||
done
|
|
||||||
done
|
|
||||||
|
|
||||||
stop
|
|
||||||
|
|
||||||
log_info "upgrading from 1.20.2-0 with conflicting sections fails"
|
|
||||||
download 1.20.3-0
|
|
||||||
timeout 60 $DIR/forgejo-1.20.3-0 --config $work_path/app.ini --work-path $work_path || true
|
|
||||||
for path in ${STORAGE_PATHS} ; do
|
|
||||||
if ! grep --fixed-strings --quiet "[storage.$path] may conflict" $work_path/log/forgejo.log ; then
|
|
||||||
cat $work_path/log/forgejo.log
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
function test_successful_upgrades() {
|
function test_successful_upgrades() {
|
||||||
for config in default specific ; do
|
for config in default specific ; do
|
||||||
log_info "using $config app.ini"
|
log_info "using $config app.ini"
|
||||||
|
@ -590,32 +376,6 @@ function test_forgejo_database_version() {
|
||||||
test "$expected_version" = "$actual_version"
|
test "$expected_version" = "$actual_version"
|
||||||
}
|
}
|
||||||
|
|
||||||
function test_forgejo_database_v3_upgrades_list_table() {
|
|
||||||
local table=$1
|
|
||||||
local work_path=$DIR/forgejo-work-path
|
|
||||||
|
|
||||||
sqlite3 $work_path/forgejo.db ".tables $table" .exit | grep --quiet $table
|
|
||||||
}
|
|
||||||
|
|
||||||
function test_forgejo_database_v3_upgrades() {
|
|
||||||
local table=forgejo_auth_token
|
|
||||||
|
|
||||||
stop
|
|
||||||
|
|
||||||
reset default
|
|
||||||
log_info "run 1.20.4-1"
|
|
||||||
start 1.20.4-1
|
|
||||||
stop
|
|
||||||
! test_forgejo_database_v3_upgrades_list_table $table
|
|
||||||
test_forgejo_database_version 2
|
|
||||||
|
|
||||||
log_info "run 1.20.5-0"
|
|
||||||
start 1.20.5-0
|
|
||||||
stop
|
|
||||||
test_forgejo_database_v3_upgrades_list_table $table
|
|
||||||
test_forgejo_database_version 3
|
|
||||||
}
|
|
||||||
|
|
||||||
function run() {
|
function run() {
|
||||||
local fun=$1
|
local fun=$1
|
||||||
shift
|
shift
|
||||||
|
@ -635,17 +395,19 @@ function run() {
|
||||||
echo Success running $fun
|
echo Success running $fun
|
||||||
}
|
}
|
||||||
|
|
||||||
|
source $SELF_DIR/test-upgrade-1.20-storage.sh
|
||||||
|
source $SELF_DIR/test-upgrade-forgejo-database-v3.sh
|
||||||
|
|
||||||
function test_upgrades() {
|
function test_upgrades() {
|
||||||
run stop
|
run stop
|
||||||
run dependencies
|
run dependencies
|
||||||
run build_all
|
run build_all
|
||||||
|
|
||||||
run test_successful_upgrades
|
run test_successful_upgrades
|
||||||
run test_bug_storage_misplace
|
|
||||||
run test_bug_storage_merged
|
|
||||||
run test_downgrade_1.20.2_fails
|
|
||||||
run test_bug_storage_s3_misplace
|
|
||||||
run test_storage_stable_s3 minio
|
run test_storage_stable_s3 minio
|
||||||
run test_storage_stable_s3 garage
|
run test_storage_stable_s3 garage
|
||||||
|
|
||||||
|
test_upgrade_1_20_storage
|
||||||
run test_forgejo_database_v3_upgrades
|
run test_forgejo_database_v3_upgrades
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue