mirror of
https://github.com/containers/podman.git
synced 2025-12-14 19:10:16 +08:00
Fix Podman logs reading journald
A podman could not read logs written to journald properly, due to a tail config bug. Added a system test to check this - since e2e tests don't like journald Signed-off-by: Ashley Cui <acui@redhat.com>
This commit is contained in:
@@ -203,6 +203,7 @@ var _ = Describe("Podman logs", func() {
|
||||
results.WaitWithDefaultTimeout()
|
||||
Expect(results).To(Exit(0))
|
||||
Expect(len(results.OutputToStringArray())).To(Equal(3))
|
||||
Expect(results.OutputToString()).To(Equal("podman podman podman"))
|
||||
})
|
||||
|
||||
It("using journald tail two lines", func() {
|
||||
|
||||
@@ -50,4 +50,15 @@ ${cid[1]} c
|
||||
${cid[0]} d" "Sequential output from logs"
|
||||
}
|
||||
|
||||
@test "podman logs over journald" {
|
||||
msg=$(random_string 20)
|
||||
|
||||
run_podman run --name myctr --log-driver journald $IMAGE echo $msg
|
||||
|
||||
run_podman logs myctr
|
||||
is "$output" "$msg" "check that log output equals the container output"
|
||||
|
||||
run_podman rm myctr
|
||||
}
|
||||
|
||||
# vim: filetype=sh
|
||||
|
||||
Reference in New Issue
Block a user