From 63e46cc85cb0a9523e9c48db7a88039e0baeac29 Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Tue, 26 Nov 2019 16:08:04 +0100 Subject: 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 --- test/system/010-images.bats | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'test') 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 -- cgit v1.2.3-54-g00ecf