Skip to content

Commit

Permalink
system tests: skip journald tests on RHEL8
Browse files Browse the repository at this point in the history
(actually, on any system exhibiting the symptom wherein
journalctl fails due to insufficient permissions, which
for all practical purposes means only RHEL8)

Signed-off-by: Ed Santiago <[email protected]>
  • Loading branch information
edsantiago committed Nov 9, 2020
1 parent 8f33751 commit c62c648
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
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

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

0 comments on commit c62c648

Please sign in to comment.