In the lifecycle of vX.Y.Z, all tests are run against vX.Y-test before it is published, including when the tag is pushed because the automated release process now runs end-to-end before pushing the release to forgejo-experimental. Running end-to-end against vX.Y-dev is therefore redundant with at least two other runs with exactly the same SHA (the one before the tag is pushed and the one when the tag is pushed). There would be value in doing that if it allowed to detect race conditions in Forgejo. But such races were not found in the past six months and there is a lot more scrutiny on commits merged in Forgejo which makes it even less likely than it was before. Running the tests on vX.Y instead of also including the built version provide the same coverage and reduces the workload.
49 lines
1.1 KiB
Bash
Executable file
49 lines
1.1 KiB
Bash
Executable file
# SPDX-License-Identifier: MIT
|
|
|
|
STORAGE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
STORAGE_PATHS="attachments avatars lfs packages repo-archive repo-avatars"
|
|
|
|
function storage_reset() {
|
|
local config=$1
|
|
reset_forgejo $STORAGE_DIR/$config-app.ini
|
|
reset_minio
|
|
reset_garage
|
|
}
|
|
|
|
function verify_storage() {
|
|
local work_path=$DIR/forgejo-work-path
|
|
|
|
for path in ${STORAGE_PATHS}; do
|
|
test -d $work_path/data/$path
|
|
done
|
|
}
|
|
|
|
function cleanup_storage() {
|
|
local work_path=$DIR/forgejo-work-path
|
|
|
|
for path in ${STORAGE_PATHS}; do
|
|
rm -fr $work_path/data/$path
|
|
done
|
|
}
|
|
|
|
function test_storage_stable_s3() {
|
|
local work_path=$DIR/forgejo-work-path
|
|
local s3_backend=${1:-minio}
|
|
|
|
for version in $RELEASE_NUMBERS; do
|
|
log_info "Forgejo $version & $s3_backend"
|
|
stop
|
|
storage_reset stable-s3
|
|
start $version $s3_backend
|
|
fixture_create
|
|
for fun in ${STORAGE_FUN}; do
|
|
fixture_${fun}_assert_s3
|
|
done
|
|
done
|
|
}
|
|
|
|
function test_storage() {
|
|
run test_storage_stable_s3 minio
|
|
run test_storage_stable_s3 garage
|
|
}
|