Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.github/workflows: Enable more tests on Ubuntu 22.04 by setting SHELL
The SHELL environment variable goes mysteriously missing from the runtime environment of the GitHub Actions workflow [1]. This breaks the 'create' and 'enter' commands with: Error: failed to get the current user's default shell ... and therefore tests involving them can't be run until this is resolved. It's been a year since this problem was first encountered and no solution is in sight. Therefore, it will be better to work around this by explicitly setting the SHELL environment variable on Ubuntu 22.04 to increase the number of tests run by the CI. The 'list' tests couldn't be enabled due to: $ bats test/system ... not ok 110 list: Containers and images # (from function `assert_line' in file test/system/libs/bats-assert/src/assert.bash, line 479, # in test file test/system/102-list.bats, line 502) # `assert_line --index 1 --partial "registry.fedoraproject.org/fedora-toolbox:34"' failed # # -- line does not contain substring -- # index : 1 # substring : registry.fedoraproject.org/fedora-toolbox:34 # line : 5c5b1421750d quay.io/toolbx/ubuntu-toolbox:22.04 28 hours ago # -- # ... The 'run' tests couldn't be enabled due to: $ bats --print-output-on-failure --verbose-run test/system ... not ok 134 run: 'sudo id' inside the default container # (from function `assert_success' in file test/system/libs/bats-assert/src/assert.bash, line 114, # in test file test/system/104-run.bats, line 208) # `assert_success' failed # ~ ~/work/toolbox/toolbox/containers/toolbox # stderr: # runner is not in the sudoers file. This incident will be reported. # # -- command failed -- # status : 1 # output : # -- # ... The 'user' tests couldn't be enabled due to: $ bats test/system ... not ok 243 user: runner in passwd(5) inside the default container # (from function `assert_line' in file test/system/libs/bats-assert/src/assert.bash, line 509, # in test file test/system/206-user.bats, line 190) # `assert_line --regexp "^$USER::$user_id_real:$user_id_real:$user_gecos:$HOME:$SHELL$"' failed # ~ ~/work/toolbox/toolbox/containers/toolbox # # -- no output line matches regular expression -- # regexp : ^runner::1001:1001:,,,:/home/runner:/bin/bash$ # output (27 lines): # root:x:0:0:root:/root:/bin/bash # ... # runner::1001:127::/home/runner:/bin/bash # -- # ... The 'ulimit' tests couldn't be enabled due to: $ bats test/system ... not ok 271 ulimit: real-time non-blocking time (hard) in 3504ms # (from function `assert_line' in file test/system/libs/bats-assert/src/assert.bash, line 488, # in test file test/system/210-ulimit.bats, line 43) # `assert_line --index 0 "$limit"' failed # ~ ~/work/toolbox/toolbox/containers/toolbox # # -- line differs -- # index : 0 # expected : unlimited # actual : # -- # ... The 'dbus' tests couldn't be enabled due to: $ bats --print-output-on-failure --verbose-run test/system ... not ok 206 dbus: session bus inside the default container # (from function `assert_success' in file test/system/libs/bats-assert/src/assert.bash, line 114, # in test file test/system/211-dbus.bats, line 50) # `assert_success' failed # ~ ~/work/toolbox/toolbox/containers/toolbox # stderr: # bash: line 1: exec: gdbus: not found # Error: command gdbus not found in container ubuntu-toolbox-22.04 # # -- command failed -- # status : 127 # output : # -- # ... [1] https://github.com/orgs/community/discussions/59413 #1507
- Loading branch information