summaryrefslogtreecommitdiff
path: root/test/system/130-kill.bats
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-11-02 13:18:26 +0100
committerGitHub <noreply@github.com>2021-11-02 13:18:26 +0100
commit0686f0bb2ff22abae7ca90f1b17b32d73b8615a8 (patch)
treeccc1cefa27f32b1c8ebc5924871cd4619dff4bc0 /test/system/130-kill.bats
parent24e5cbd9a5f95073509e4f83929aba166bc9ddc8 (diff)
parente68fbf03aa4e117e769b479d5a83a4bbc0628a33 (diff)
downloadpodman-0686f0bb2ff22abae7ca90f1b17b32d73b8615a8.tar.gz
podman-0686f0bb2ff22abae7ca90f1b17b32d73b8615a8.tar.bz2
podman-0686f0bb2ff22abae7ca90f1b17b32d73b8615a8.zip
Merge pull request #12118 from hshiina/log-f-journald
Set flags to test 'logs -f' with journald driver
Diffstat (limited to 'test/system/130-kill.bats')
-rw-r--r--test/system/130-kill.bats15
1 files changed, 14 insertions, 1 deletions
diff --git a/test/system/130-kill.bats b/test/system/130-kill.bats
index d85f0a6a9..1ff3a7b61 100644
--- a/test/system/130-kill.bats
+++ b/test/system/130-kill.bats
@@ -6,9 +6,22 @@
load helpers
@test "podman kill - test signal handling in containers" {
+
+ # Prepare for 'logs -f'
+ run_podman info --format '{{.Host.LogDriver}}'
+ log_driver=$output
+ run_podman info --format '{{.Host.EventLogger}}'
+ event_logger=$output
+ opt_log_driver=
+ if [ $log_driver = "journald" ] && [ $event_logger != "journald" ]; then
+ # Since PR#10431, 'logs -f' with journald driver is only supported with journald events backend.
+ # Set '--log driver' temporally because remote doesn't support '--events-backend'.
+ opt_log_driver="--log-driver k8s-file"
+ fi
+
# Start a container that will handle all signals by emitting 'got: N'
local -a signals=(1 2 3 4 5 6 8 10 12 13 14 15 16 20 21 22 23 24 25 26 64)
- run_podman run -d $IMAGE sh -c \
+ run_podman run -d ${opt_log_driver} $IMAGE sh -c \
"for i in ${signals[*]}; do trap \"echo got: \$i\" \$i; done;
echo READY;
while ! test -e /stop; do sleep 0.05; done;