-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Tests: Check different log driver can work with podman logs #8096
Conversation
test/system/030-run.bats
Outdated
@@ -413,6 +413,16 @@ json-file | f | |||
else | |||
is "$output" "" "LogPath (driver=$driver)" | |||
fi | |||
|
|||
run_podman ? logs myctr |
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.
Tab issue?
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.
Thanks for reminder. Updated.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rhatdan, ypu The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
test/system/030-run.bats
Outdated
|
||
run_podman ? logs myctr | ||
if [[ $driver != 'none' ]]; then | ||
is "$output" "$msg" "check that podman logs works as expect" |
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.
nit, only if you need to make other changes:
is "$output" "$msg" "check that podman logs works as expect" | |
is "$output" "$msg" "check that podman logs works as expected" |
test/system/030-run.bats
Outdated
run_podman ? logs myctr | ||
if [[ $driver != 'none' ]]; then | ||
is "$output" "$msg" "check that podman logs works as expect" | ||
[[ $status == 0 ]] |
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.
The bats [[
usage is evil. Please do this instead:
if [[ $driver == 'none' ]]; then
run_podman 125 logs myctr
...
else
run_podman logs myctr
...
fi
Add a check step in podman run --log-driver test. Prefer to add it here as it already has a loop to cover all different drivers in this test. Signed-off-by: Yiqiao Pu <[email protected]>
Thanks @TomSweeneyRedHat and @edsantiago for your comments. Update the code, also fixed the check failed for --log-driver none in remote test. |
/lgtm Thank you! |
Followup to containers#8284, due to my not having noticed containers#8096. RHEL gating tests are failing again due to rhbz#1895105, the one where we can't run journalctl rootless on RHEL. containers#8284 fixed this for some RHEL builds of older podman, but I missed containers#8096 which added yet another logs test. This brings us to three journalctl exceptions, which means it gets complicated because I have to refactor it all. **THIS IS NOT SUSTAINABLE**. We need some way to have a similar setup in CI, with a permission-less rootless login, so we don't add yet another logs test some day and discover, months later, that it doesn't work on RHEL and then have to go into crisis mode. Signed-off-by: Ed Santiago <[email protected]>
Followup to containers#8284, due to my not having noticed containers#8096. RHEL gating tests are failing again due to rhbz#1895105, the one where we can't run journalctl rootless on RHEL. containers#8284 fixed this for some RHEL builds of older podman, but I missed containers#8096 which added yet another logs test. This brings us to three journalctl exceptions, which means it gets complicated because I have to refactor it all. **THIS IS NOT SUSTAINABLE**. We need some way to have a similar setup in CI, with a permission-less rootless login, so we don't add yet another logs test some day and discover, months later, that it doesn't work on RHEL and then have to go into crisis mode. Signed-off-by: Ed Santiago <[email protected]>
Followup to containers#8284, due to my not having noticed containers#8096. RHEL gating tests are failing again due to rhbz#1895105, the one where we can't run journalctl rootless on RHEL. containers#8284 fixed this for some RHEL builds of older podman, but I missed containers#8096 which added yet another logs test. This brings us to three journalctl exceptions, which means it gets complicated because I have to refactor it all. **THIS IS NOT SUSTAINABLE**. We need some way to have a similar setup in CI, with a permission-less rootless login, so we don't add yet another logs test some day and discover, months later, that it doesn't work on RHEL and then have to go into crisis mode. Signed-off-by: Ed Santiago <[email protected]>
Add a check step in podman run --log-driver test. Prefer to add it here as it already has a loop to cover all different drivers
in this test.