mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-15 18:57:01 +00:00
chore(tests): add coverage for ./pkg/runner (#202)
Only changes test files. --- - remove tests specific to running on a host with no container they are the same as with the containers (TestRunEventHostEnvironment) - prefix the name of the tests with a distinctive name to more easily run them together - use code.forgejo.org/oci images whereever possible - remove some tests that are either - difficult to understand (ancient bugs) - not yet well understood (related to reusable workflows) - depend on github (generation of workflows to be run on the fly e.g. updateTestIfWorkflow) - fix the TestSanitizeNetworkAlias tests that were not run and make them easier to debug - disable tests of options that are forbidden in Forgejo Actions (testdata/container-hostname/push.yml) Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/202 Reviewed-by: Michael Kriese <michael.kriese@gmx.de> Co-authored-by: Earl Warren <contact@earl-warren.org> Co-committed-by: Earl Warren <contact@earl-warren.org>
This commit is contained in:
parent
30ea23384a
commit
87d973b894
65 changed files with 218 additions and 656 deletions
14
act/runner/testdata/container-hostname/push.yml
vendored
14
act/runner/testdata/container-hostname/push.yml
vendored
|
@ -9,22 +9,18 @@ jobs:
|
|||
with-hostname:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: node:16-buster-slim
|
||||
options: "--hostname my.host.local --user 100:101"
|
||||
image: code.forgejo.org/oci/node:22-bookworm
|
||||
options: "--hostname my.host.local"
|
||||
steps:
|
||||
- run: |
|
||||
echo "UID: $(id -u)"
|
||||
echo "GID: $(id -g)"
|
||||
echo "HOST: $(uname -n)"
|
||||
[[ "$(id -u)" == "100" ]] && [[ "$(id -g)" == "101" ]] && [[ "$(uname -n)" == "my.host.local" ]]
|
||||
[[ "$(uname -n)" == "my.host.local" ]]
|
||||
|
||||
default-hostname:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: node:16-buster-slim
|
||||
image: code.forgejo.org/oci/node:22-bookworm
|
||||
steps:
|
||||
- run: |
|
||||
echo "UID: $(id -u)"
|
||||
echo "GID: $(id -g)"
|
||||
echo "HOST: $(uname -n)"
|
||||
[[ "$(id -u)" == "0" ]] && [[ "$(id -g)" == "0" ]] && [[ $(uname -n) ]] && [[ "$(uname -n)" != "my.host.local" ]]
|
||||
[[ "$(uname -n)" != "my.host.local" ]]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue