-
Notifications
You must be signed in to change notification settings - Fork 236
test/system: Silence warning with Bats >= 1.7.0 #1081
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test/system: Silence warning with Bats >= 1.7.0 #1081
Conversation
Bats 1.7.0 emits a warning if a command passed to 'run' returns with an exit code of 127 [1]. [1] Bats commit c6dc2f88361a4f5b bats-core/bats-core#586 https://bats-core.readthedocs.io/en/stable/warnings/BW01.html containers#1081
e620481
to
bf58987
Compare
Build failed. ✔️ system-test-fedora-rawhide SUCCESS in 16m 26s |
Bats 1.7.0 emits a warning if a command passed to 'run' returns with an exit code of 127 [1]. This requires Bats >= 1.5.0, which is present in Fedora >=35. However, bats_require_minimum_version can't be used. [1] Bats commit c6dc2f88361a4f5b bats-core/bats-core#586 https://bats-core.readthedocs.io/en/stable/warnings/BW01.html containers#1081
bf58987
to
5a2368d
Compare
Build failed. ✔️ system-test-fedora-rawhide SUCCESS in 16m 27s |
Fedora 34 reached End of Life on 7th June 2022: https://docs.fedoraproject.org/en-US/releases/eol/ The subsequent commit will bump the minimum required Bats version to 1.5.0, which is absent in Fedora 34. containers#1081
Bats 1.7.0 emits a warning if a command passed to 'run' returns with an exit code of 127 [1]. This requires Bats >= 1.5.0, which is present in Fedora >=35, and supports specifying the exit code as an argument to Bats' 'run' command [2]. However, bats_require_minimum_version can't be used, because it's only available from Bats 1.7.0, which is new enough that it's absent in Fedora 35. [1] Bats commit c6dc2f88361a4f5b bats-core/bats-core#547 https://bats-core.readthedocs.io/en/stable/warnings/BW01.html [2] bats-core/bats-core#367 bats-core/bats-core#507 https://bats-core.readthedocs.io/en/stable/writing-tests.html [3] Bats commit 71d6b71cebc3d32b bats-core/bats-core#556 https://bats-core.readthedocs.io/en/stable/warnings/BW02.html containers#1081
5a2368d
to
f58a904
Compare
Build failed. ✔️ unit-test SUCCESS in 6m 48s |
Interesting:
|
recheck |
Build succeeded. ✔️ unit-test SUCCESS in 6m 47s |
This has happened to me in the past and usually the trigger was interrupting the system tests and not allowing them to properly teardown. But in the context of the CI, very curious. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks sensible. I'm not sure now if I ever noticed the error this PR is fixing. But it doesn't break the tests, so let's go with it.
Fedora 34 reached End of Life on 7th June 2022: https://docs.fedoraproject.org/en-US/releases/eol/ The subsequent commit will bump the minimum required Bats version to 1.5.0, which is absent from Fedora 34. containers#1081
Bats 1.7.0 emits a warning if a command passed to 'run' returns with an exit code of 127 [1]: BW01: `run`'s command `/opt/bin/toolbox run non-existent-command` exited with code 127, indicating 'Command not found'. Use run's return code checks, e.g. `run -127`, to fix this message. (from function `run' in file /usr/lib/bats-core/test_functions.bash, line 299, in test file test/system/104-run.bats, line 148) This requires Bats >= 1.5.0, which is present in Fedora >=35, and supports specifying the exit code as an argument to Bats' 'run' command [2]. However, bats_require_minimum_version can't be used, because it's only available from Bats 1.7.0, which is new enough that it's absent from Fedora 35. [1] Bats commit c6dc2f88361a4f5b bats-core/bats-core#547 https://bats-core.readthedocs.io/en/stable/warnings/BW01.html [2] bats-core/bats-core#367 bats-core/bats-core#507 https://bats-core.readthedocs.io/en/stable/writing-tests.html [3] Bats commit 71d6b71cebc3d32b bats-core/bats-core#556 https://bats-core.readthedocs.io/en/stable/warnings/BW02.html containers#1081
f58a904
to
978bb52
Compare
Try running the tests locally on Fedora >= 36. |
Fedora 34 reached End of Life on 7th June 2022: https://docs.fedoraproject.org/en-US/releases/eol/ The subsequent commit will bump the minimum required Bats version to 1.5.0, which is absent from Fedora 34. containers#1081
Bats 1.7.0 emits a warning if a command passed to 'run' returns with an exit code of 127 [1]: BW01: `run`'s command `/opt/bin/toolbox run non-existent-command` exited with code 127, indicating 'Command not found'. Use run's return code checks, e.g. `run -127`, to fix this message. (from function `run' in file /usr/lib/bats-core/test_functions.bash, line 299, in test file test/system/104-run.bats, line 148) This requires Bats >= 1.5.0, which is present in Fedora >=35, and supports specifying the exit code as an argument to Bats' 'run' command [2]. However, bats_require_minimum_version can't be used, because it's only available from Bats 1.7.0, which is new enough that it's absent from Fedora 35. [1] Bats commit c6dc2f88361a4f5b bats-core/bats-core#547 https://bats-core.readthedocs.io/en/stable/warnings/BW01.html [2] bats-core/bats-core#367 bats-core/bats-core#507 https://bats-core.readthedocs.io/en/stable/writing-tests.html [3] Bats commit 71d6b71cebc3d32b bats-core/bats-core#556 https://bats-core.readthedocs.io/en/stable/warnings/BW02.html containers#1081
Bats 1.7.0 emits a warning if a command passed to 'run' returns with an
exit code of 127 [1].
This requires Bats >= 1.5.0, which is present in Fedora >=35, and
supports specifying the exit code as an argument to Bats' 'run'
command [2].
However, bats_require_minimum_version can't be used, because it's
only available from Bats 1.7.0, which is new enough that it's absent in
Fedora 35.
[1] Bats commit c6dc2f88361a4f5b
bats-core/bats-core#586
https://bats-core.readthedocs.io/en/stable/warnings/BW01.html
[2] bats-core/bats-core#367
bats-core/bats-core#507
https://bats-core.readthedocs.io/en/stable/writing-tests.html
[3] Bats commit 71d6b71cebc3d32b
bats-core/bats-core#556
https://bats-core.readthedocs.io/en/stable/warnings/BW02.html