mirror of
https://github.com/containers/podman
synced 2024-10-20 17:23:30 +00:00
Journald log driver test
Test that the journald log driver writes to journald and that we can read it with journalctl. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
This commit is contained in:
parent
03d01abec6
commit
1db49d95b7
|
@ -387,5 +387,18 @@ json-file | f
|
|||
"--log-driver InvalidDriver"
|
||||
}
|
||||
|
||||
@test "podman run --log-driver journald" {
|
||||
skip_if_remote "We cannot read journalctl over remote."
|
||||
|
||||
msg=$(random_string 20)
|
||||
pidfile="${PODMAN_TMPDIR}/$(random_string 20)"
|
||||
|
||||
run_podman run --name myctr --log-driver journald --conmon-pidfile $pidfile $IMAGE echo $msg
|
||||
|
||||
journalctl --output cat _PID=$(cat $pidfile)
|
||||
is "$output" "$msg" "check that journalctl output equals the container output"
|
||||
|
||||
run_podman rm myctr
|
||||
}
|
||||
|
||||
# vim: filetype=sh
|
||||
|
|
Loading…
Reference in a new issue