mirror of
https://github.com/containers/podman.git
synced 2025-12-12 09:50:25 +08:00
filter events by labels
adding the ability to filter evens by the container labels. this requires that container labels be added to the events data being recorded and subsequently read. Signed-off-by: baude <bbaude@redhat.com>
This commit is contained in:
14
test/system/090-events.bats
Normal file
14
test/system/090-events.bats
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bats -*- bats -*-
|
||||
#
|
||||
# tests for podman events functionality
|
||||
#
|
||||
|
||||
load helpers
|
||||
|
||||
@test "events with a filter by label" {
|
||||
skip_if_remote "Need to talk to Ed on why this is failing on remote"
|
||||
rand=$(random_string 30)
|
||||
run_podman 0 run --label foo=bar --name test-$rand --rm $IMAGE ls
|
||||
run_podman 0 events --filter type=container --filter container=test-$rand --filter label=foo=bar --filter event=start --stream=false
|
||||
is "$output" ".*foo=bar" "check for label event on container with label"
|
||||
}
|
||||
Reference in New Issue
Block a user