summaryrefslogtreecommitdiff
path: root/test/system
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-11-15 22:09:29 +0100
committerGitHub <noreply@github.com>2021-11-15 22:09:29 +0100
commit45d28c2219b64d81323b7a15fef589b11b6c63b3 (patch)
tree8a98c2c087fc7d8719cda00ad81f181ab93cdc19 /test/system
parent230f0b622e391b78626f150471fce5c198048ed8 (diff)
parent63ef7135d957d396b87727b6151f9caf3266366d (diff)
downloadpodman-45d28c2219b64d81323b7a15fef589b11b6c63b3.tar.gz
podman-45d28c2219b64d81323b7a15fef589b11b6c63b3.tar.bz2
podman-45d28c2219b64d81323b7a15fef589b11b6c63b3.zip
Merge pull request #12285 from nalind/journal-follow-not-early
journald logs: keep reading until the journal's end
Diffstat (limited to 'test/system')
-rw-r--r--test/system/035-logs.bats21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/system/035-logs.bats b/test/system/035-logs.bats
index 7fb3e62e4..44984eaad 100644
--- a/test/system/035-logs.bats
+++ b/test/system/035-logs.bats
@@ -89,6 +89,27 @@ ${cid[0]} d" "Sequential output from logs"
_log_test_multi journald
}
+function _log_test_restarted() {
+ run_podman run --log-driver=$1 --name logtest $IMAGE sh -c 'start=0; if test -s log; then start=`tail -n 1 log`; fi; seq `expr $start + 1` `expr $start + 10` | tee -a log'
+ run_podman start -a logtest
+ logfile=$(mktemp -p ${PODMAN_TMPDIR} logfileXXXXXXXX)
+ $PODMAN $_PODMAN_TEST_OPTS logs -f logtest > $logfile
+ expected=$(mktemp -p ${PODMAN_TMPDIR} expectedXXXXXXXX)
+ seq 1 20 > $expected
+ diff -u ${expected} ${logfile}
+}
+
+@test "podman logs restarted - k8s-file" {
+ _log_test_restarted k8s-file
+}
+
+@test "podman logs restarted journald" {
+ # We can't use journald on RHEL as rootless: rhbz#1895105
+ skip_if_journald_unavailable
+
+ _log_test_restarted journald
+}
+
@test "podman logs - journald log driver requires journald events backend" {
skip_if_remote "remote does not support --events-backend"
# We can't use journald on RHEL as rootless: rhbz#1895105