From 1db49d95b77aea8bd327e42fe89fb9ea3f8a67a1 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Mon, 28 Sep 2020 12:21:39 +0200 Subject: 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 --- test/system/030-run.bats | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/system/030-run.bats') diff --git a/test/system/030-run.bats b/test/system/030-run.bats index 11edaf11c..6430c80fb 100644 --- a/test/system/030-run.bats +++ b/test/system/030-run.bats @@ -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 -- cgit v1.2.3-54-g00ecf