summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2021-11-18 09:03:00 -0700
committerJhon Honce <jhonce@redhat.com>2021-12-02 09:07:27 -0700
commit61792de36ea2ea98f6e3aef3821d1b15beebf9e0 (patch)
treef2e73122b2cdb0323e1d38792eef44a625b85d10 /test
parentfbcebcb46a2444ce078dee10d8d51555bee8f177 (diff)
downloadpodman-61792de36ea2ea98f6e3aef3821d1b15beebf9e0.tar.gz
podman-61792de36ea2ea98f6e3aef3821d1b15beebf9e0.tar.bz2
podman-61792de36ea2ea98f6e3aef3821d1b15beebf9e0.zip
Refactor podman image command output
Leverage new report.Formatter allowing better compatibility from podman command output. Follow on PR's will cover containers, etc. See #10974 Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/system/010-images.bats2
-rw-r--r--test/system/110-history.bats8
2 files changed, 8 insertions, 2 deletions
diff --git a/test/system/010-images.bats b/test/system/010-images.bats
index 1e9d5f181..9de31f96c 100644
--- a/test/system/010-images.bats
+++ b/test/system/010-images.bats
@@ -221,9 +221,7 @@ Labels.created_at | 20[0-9-]\\\+T[0-9:]\\\+Z
iid=${output:0:12}
# Run the test: this will output three column-aligned rows. Test them.
- # Tab character (\t) should have the same effect as the 'table' directive
_run_format_test 'table' 'table {{.Repository}} {{.Tag}} {{.ID}}'
- _run_format_test 'tabs' '{{.Repository}}\t{{.Tag}}\t{{.ID}}'
# Clean up.
run_podman rmi ${aaa_name}:${aaa_tag} ${zzz_name}:${zzz_tag}
diff --git a/test/system/110-history.bats b/test/system/110-history.bats
index 75c15b088..0f6d75cb3 100644
--- a/test/system/110-history.bats
+++ b/test/system/110-history.bats
@@ -21,6 +21,14 @@ load helpers
done
}
+@test "podman history - custom format" {
+ run_podman history --format "{{.ID}}\t{{.ID}}" $IMAGE
+ od -c <<<$output
+ while IFS= read -r row; do
+ is "$row" ".* .*$"
+ done <<<$output
+}
+
@test "podman history - json" {
# Sigh. Timestamp in .created can be '...Z' or '...-06:00'
tests="