summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-06-02 23:26:55 +0200
committerGitHub <noreply@github.com>2021-06-02 23:26:55 +0200
commit326c758bfd74f48a16a02db1d9d950f128156683 (patch)
treea72f679d1b25a43ac430dea94966cedad43004a5 /test
parent4b202ae29bbcbc00bcd0e9128b8e0a44080916c6 (diff)
parentce5c3b55434501f70b8ba8b0e2a9db1cce2e9360 (diff)
downloadpodman-326c758bfd74f48a16a02db1d9d950f128156683.tar.gz
podman-326c758bfd74f48a16a02db1d9d950f128156683.tar.bz2
podman-326c758bfd74f48a16a02db1d9d950f128156683.zip
Merge pull request #10534 from vrothberg/v3.2-fix-10507
[v.3.2] events: support disjunctive filters
Diffstat (limited to 'test')
-rw-r--r--test/system/090-events.bats29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/system/090-events.bats b/test/system/090-events.bats
index 19bee5506..09c2d0c10 100644
--- a/test/system/090-events.bats
+++ b/test/system/090-events.bats
@@ -61,3 +61,32 @@ load helpers
.*image remove $imageID $tag.*" \
"podman events"
}
+
+function _events_disjunctive_filters() {
+ local backend=$1
+
+ # Regression test for #10507: make sure that filters with the same key are
+ # applied in disjunction.
+ t0=$(date --iso-8601=seconds)
+ run_podman $backend run --name foo --rm $IMAGE ls
+ run_podman $backend run --name bar --rm $IMAGE ls
+ run_podman $backend events --stream=false --since=$t0 --filter container=foo --filter container=bar --filter event=start
+ is "$output" ".* container start .* name=foo.*
+.* container start .* name=bar.*"
+}
+
+@test "events with disjunctive filters - file" {
+ skip_if_remote "remote does not support --events-backend"
+ _events_disjunctive_filters --events-backend=file
+}
+
+@test "events with disjunctive filters - journald" {
+ skip_if_remote "remote does not support --events-backend"
+ _events_disjunctive_filters --events-backend=journald
+}
+
+@test "events with disjunctive filters - default" {
+ # NOTE: the last event for bar doesn't show up reliably.
+ skip_if_remote "FIXME #10529: remote events lose data"
+ _events_disjunctive_filters ""
+}