actions: verify the log compression feature
If running Forgejo >= v9.0, verify the logs are compressed by default
This commit is contained in:
parent
5ad828b7a2
commit
8636471d63
2 changed files with 29 additions and 3 deletions
|
@ -3,13 +3,27 @@
|
|||
|
||||
ACTIONS_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
function actions_verify_example() {
|
||||
local example=$1
|
||||
|
||||
function actions_export_variables() {
|
||||
export HOST_PORT
|
||||
export url=http://${FORGEJO_USER}:${FORGEJO_PASSWORD}@${HOST_PORT}
|
||||
export token=$(cat $DOT_FORGEJO_CURL/token)
|
||||
}
|
||||
|
||||
function actions_verify_feature() {
|
||||
local feature=$1
|
||||
|
||||
actions_export_variables
|
||||
|
||||
export FEATURE_DIR=$ACTIONS_DIR/feature-$feature
|
||||
|
||||
echo "============================ RUN feature-$feature ==================="
|
||||
bash -ex $FEATURE_DIR/run.sh || return 1
|
||||
}
|
||||
|
||||
function actions_verify_example() {
|
||||
local example=$1
|
||||
|
||||
actions_export_variables
|
||||
actions_cleanup_example_volume
|
||||
|
||||
export example
|
||||
|
@ -124,5 +138,9 @@ function test_actions() {
|
|||
run actions_verify_example $example
|
||||
done
|
||||
fi
|
||||
|
||||
if dpkg --compare-versions $version ge 9.0; then
|
||||
run actions_verify_feature logs-compression
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
|
8
actions/feature-logs-compression/run.sh
Executable file
8
actions/feature-logs-compression/run.sh
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
source $FEATURE_DIR/../../lib/lib.sh
|
||||
source $FEATURE_DIR/../../forgejo/fixtures.sh
|
||||
|
||||
fixture_get_one_path local data/actions_log/root/example-echo/01/1.log.zst
|
Loading…
Add table
Reference in a new issue