summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-12-02 19:28:48 +0100
committerGitHub <noreply@github.com>2021-12-02 19:28:48 +0100
commit4ff0ba4c8731e3dc1d56010f80468260104f3abc (patch)
tree897ede56e699e7f39ad5aa949851bf7fd11ea3c3 /test
parentee39281c35e3ceca98c0c51c9cc5d792c56ba533 (diff)
parent61792de36ea2ea98f6e3aef3821d1b15beebf9e0 (diff)
downloadpodman-4ff0ba4c8731e3dc1d56010f80468260104f3abc.tar.gz
podman-4ff0ba4c8731e3dc1d56010f80468260104f3abc.tar.bz2
podman-4ff0ba4c8731e3dc1d56010f80468260104f3abc.zip
Merge pull request #12455 from jwhonce/issues/10974
Refactor podman image command output
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="