Skip to content
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

system tests: skip journald tests on RHEL8 #8284

Merged
merged 1 commit into from
Nov 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions test/system/030-run.bats
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,16 @@ json-file | f
@test "podman run --log-driver journald" {
skip_if_remote "We cannot read journalctl over remote."

# We can't use journald on RHEL as rootless, either: rhbz#1895105
if is_rootless; then
run journalctl -n 1
if [[ $status -ne 0 ]]; then
if [[ $output =~ permission ]]; then
skip "Cannot use rootless journald on this system"
fi
fi
fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be good to move this to a skip_if_rootless_rhel type of function?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the too-late response. As much as I hate duplication, on two-offs I often just hold my nose and leave it. Should there ever be a need for a third exception, then yes, absolutely, refactor.


msg=$(random_string 20)
pidfile="${PODMAN_TMPDIR}/$(random_string 20)"

Expand Down
10 changes: 10 additions & 0 deletions test/system/035-logs.bats
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@ ${cid[0]} d" "Sequential output from logs"
}

@test "podman logs over journald" {
# We can't use journald on RHEL as rootless: rhbz#1895105
if is_rootless; then
run journalctl -n 1
if [[ $status -ne 0 ]]; then
if [[ $output =~ permission ]]; then
skip "Cannot use rootless journald on this system"
fi
fi
fi

msg=$(random_string 20)

run_podman run --name myctr --log-driver journald $IMAGE echo $msg
Expand Down