diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-09-12 19:55:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-12 19:55:15 +0200 |
commit | 6e545945a562b0116aa18ab0f38b36c59166838e (patch) | |
tree | 0dd37a72a795a61dcda08423d7aeac37e9ba5c94 /test/system/090-events.bats | |
parent | 8432ed7488e9c62738f9308fcc03f2ae9c2cd615 (diff) | |
parent | a63a40c3eece95e96e5b52a00646998606c5f82c (diff) | |
download | podman-6e545945a562b0116aa18ab0f38b36c59166838e.tar.gz podman-6e545945a562b0116aa18ab0f38b36c59166838e.tar.bz2 podman-6e545945a562b0116aa18ab0f38b36c59166838e.zip |
Merge pull request #15717 from Luap99/events
fix several podman events issues
Diffstat (limited to 'test/system/090-events.bats')
-rw-r--r-- | test/system/090-events.bats | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/test/system/090-events.bats b/test/system/090-events.bats index cd1bf327b..3fac51938 100644 --- a/test/system/090-events.bats +++ b/test/system/090-events.bats @@ -74,6 +74,7 @@ load helpers .*image tag $imageID $tag .*image untag $imageID $tag:latest .*image tag $imageID $tag +.*image untag $imageID $IMAGE .*image untag $imageID $tag:latest .*image remove $imageID $imageID" \ "podman events" @@ -147,7 +148,6 @@ function _populate_events_file() { # Config without a limit eventsFile=$PODMAN_TMPDIR/events.txt - _populate_events_file $eventsFile containersConf=$PODMAN_TMPDIR/containers.conf cat >$containersConf <<EOF [engine] @@ -155,6 +155,11 @@ events_logger="file" events_logfile_path="$eventsFile" EOF + # Check that a non existing event file does not cause a hang (#15688) + CONTAINERS_CONF=$containersConf run_podman events --stream=false + + _populate_events_file $eventsFile + # Create events *without* a limit and make sure that it has not been # rotated/truncated. contentBefore=$(head -n100 $eventsFile) @@ -213,3 +218,12 @@ EOF --format="{{.Attributes.$lname}}" assert "$output" = "$lvalue" "podman-events output includes container label" } + +@test "events - backend none should error" { + skip_if_remote "remote does not support --events-backend" + + run_podman 125 --events-backend none events + is "$output" "Error: cannot read events with the \"none\" backend" "correct error message" + run_podman 125 --events-backend none events --stream=false + is "$output" "Error: cannot read events with the \"none\" backend" "correct error message" +} |