summaryrefslogtreecommitdiff
path: root/test/system
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-09-16 05:41:09 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2021-09-16 09:41:29 -0400
commit4216f7b7f492fee80cfc9a7f1deb608096edd890 (patch)
tree56ede81779ebfd2d02b2eea581a204706991db1b /test/system
parent9119a578e782b92bd344f093f5491c318bc20d69 (diff)
downloadpodman-4216f7b7f492fee80cfc9a7f1deb608096edd890.tar.gz
podman-4216f7b7f492fee80cfc9a7f1deb608096edd890.tar.bz2
podman-4216f7b7f492fee80cfc9a7f1deb608096edd890.zip
Add no-trunc support to podman-events
Standardize on no-trunc through the code. Alias notruncate where necessary. Standardize on the man page display of no-trunc. Fixes: https://github.com/containers/podman/issues/8941 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'test/system')
-rw-r--r--test/system/090-events.bats17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/system/090-events.bats b/test/system/090-events.bats
index 22edaeee9..1fb542ccd 100644
--- a/test/system/090-events.bats
+++ b/test/system/090-events.bats
@@ -25,6 +25,23 @@ load helpers
is "$output" "$expect" "filtering just by label"
}
+@test "truncate events" {
+ cname=test-$(random_string 30 | tr A-Z a-z)
+ labelname=$(random_string 10)
+ labelvalue=$(random_string 15)
+
+ run_podman run -d --name=$cname --rm $IMAGE echo hi
+ id="$output"
+
+ expect="$id"
+ run_podman events --filter container=$cname --filter event=start --stream=false
+ is "$output" ".* $id " "filtering by container name full id"
+
+ truncID=$(expr substr "$id" 1 12)
+ run_podman events --filter container=$cname --filter event=start --stream=false --no-trunc=false
+ is "$output" ".* $truncID " "filtering by container name trunc id"
+}
+
@test "image events" {
skip_if_remote "remote does not support --events-backend"
pushedDir=$PODMAN_TMPDIR/dir