Merge pull request 'actions: verify the log compression feature' (#246) from earl-warren/end-to-end:wip-actions-log into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/246
This commit is contained in:
commit
812385a18c
2 changed files with 29 additions and 3 deletions
|
@ -3,13 +3,27 @@
|
||||||
|
|
||||||
ACTIONS_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
ACTIONS_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
function actions_verify_example() {
|
function actions_export_variables() {
|
||||||
local example=$1
|
|
||||||
|
|
||||||
export HOST_PORT
|
export HOST_PORT
|
||||||
export url=http://${FORGEJO_USER}:${FORGEJO_PASSWORD}@${HOST_PORT}
|
export url=http://${FORGEJO_USER}:${FORGEJO_PASSWORD}@${HOST_PORT}
|
||||||
export token=$(cat $DOT_FORGEJO_CURL/token)
|
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
|
actions_cleanup_example_volume
|
||||||
|
|
||||||
export example
|
export example
|
||||||
|
@ -124,5 +138,9 @@ function test_actions() {
|
||||||
run actions_verify_example $example
|
run actions_verify_example $example
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if dpkg --compare-versions $version ge 9.0; then
|
||||||
|
run actions_verify_feature logs-compression
|
||||||
|
fi
|
||||||
done
|
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