summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-06-02 10:37:58 -0400
committerGitHub <noreply@github.com>2021-06-02 10:37:58 -0400
commit52dae693da0df1447b7f5210a4c842d5c5a8a401 (patch)
tree2f0add142c8bf9fbf901cf4538ceafa747a78797 /test
parent6df37abd502d53a695392723af0d4a4970be3e58 (diff)
parent37f39eefee72ec4fb6c6bd71642e9d384c448387 (diff)
downloadpodman-52dae693da0df1447b7f5210a4c842d5c5a8a401.tar.gz
podman-52dae693da0df1447b7f5210a4c842d5c5a8a401.tar.bz2
podman-52dae693da0df1447b7f5210a4c842d5c5a8a401.zip
Merge pull request #10514 from vrothberg/fix-10507
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 ""
+}