summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-09-07 14:18:41 +0200
committerGitHub <noreply@github.com>2021-09-07 14:18:41 +0200
commitc20227bd16cae98247955b14f6dfea33a26c6a0b (patch)
treec27ae52ccb67343cd06f6654546246543529dd5c /test
parent6e3a2d3ecacc70b27cc29fbf3e7f93494cdc97a4 (diff)
parent1eaa449590515a0bb6207316fe5fba734ebde335 (diff)
downloadpodman-c20227bd16cae98247955b14f6dfea33a26c6a0b.tar.gz
podman-c20227bd16cae98247955b14f6dfea33a26c6a0b.tar.bz2
podman-c20227bd16cae98247955b14f6dfea33a26c6a0b.zip
Merge pull request #11464 from vrothberg/fix-11461
logs -f: file: fix dead lock
Diffstat (limited to 'test')
-rw-r--r--test/system/035-logs.bats27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/system/035-logs.bats b/test/system/035-logs.bats
index 32282c8e1..a04d2ac74 100644
--- a/test/system/035-logs.bats
+++ b/test/system/035-logs.bats
@@ -174,4 +174,31 @@ $s_after"
_log_test_until journald
}
+function _log_test_follow() {
+ local driver=$1
+ cname=$(random_string)
+ contentA=$(random_string)
+ contentB=$(random_string)
+ contentC=$(random_string)
+
+ # Note: it seems we need at least three log lines to hit #11461.
+ run_podman run --log-driver=$driver --name $cname $IMAGE sh -c "echo $contentA; echo $contentB; echo $contentC"
+ run_podman logs -f $cname
+ is "$output" "$contentA
+$contentB
+$contentC" "logs -f on exitted container works"
+
+ run_podman rm -f $cname
+}
+
+@test "podman logs - --follow k8s-file" {
+ _log_test_follow k8s-file
+}
+
+@test "podman logs - --follow journald" {
+ # We can't use journald on RHEL as rootless: rhbz#1895105
+ skip_if_journald_unavailable
+
+ _log_test_follow journald
+}
# vim: filetype=sh