summaryrefslogtreecommitdiff
path: root/test/system
diff options
context:
space:
mode:
authorSascha Grunert <sgrunert@suse.com>2019-11-26 16:08:04 +0100
committerSascha Grunert <sgrunert@suse.com>2019-11-27 13:42:06 +0100
commit63e46cc85cb0a9523e9c48db7a88039e0baeac29 (patch)
tree4d3720c8cc7b6d8058302a6682e4597530b52ef1 /test/system
parentaef38585ed313d1096c1fa4f6281f36e5e47422b (diff)
downloadpodman-63e46cc85cb0a9523e9c48db7a88039e0baeac29.tar.gz
podman-63e46cc85cb0a9523e9c48db7a88039e0baeac29.tar.bz2
podman-63e46cc85cb0a9523e9c48db7a88039e0baeac29.zip
Add support for image name history
We leverage the containers/storage image history tracking feature to show the previously used image names when running: `podman images --history` Signed-off-by: Sascha Grunert <sgrunert@suse.com>
Diffstat (limited to 'test/system')
-rw-r--r--test/system/010-images.bats15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/system/010-images.bats b/test/system/010-images.bats
index 380623078..543876509 100644
--- a/test/system/010-images.bats
+++ b/test/system/010-images.bats
@@ -44,4 +44,19 @@ size | [0-9]\\\+
}
+@test "podman images - history output" {
+ run_podman images --format json
+ actual=$(echo $output | jq -r '.[0].history | length')
+ is "$actual" "0"
+
+ run_podman tag $PODMAN_TEST_IMAGE_REGISTRY/$PODMAN_TEST_IMAGE_USER/$PODMAN_TEST_IMAGE_NAME:$PODMAN_TEST_IMAGE_TAG test-image
+ run_podman images --format json
+ actual=$(echo $output | jq -r '.[1].history | length')
+ is "$actual" "0"
+ actual=$(echo $output | jq -r '.[0].history | length')
+ is "$actual" "1"
+ actual=$(echo $output | jq -r '.[0].history[0]')
+ is "$actual" "$PODMAN_TEST_IMAGE_REGISTRY/$PODMAN_TEST_IMAGE_USER/$PODMAN_TEST_IMAGE_NAME:$PODMAN_TEST_IMAGE_TAG"
+}
+
# vim: filetype=sh