Skip to content

Commit

Permalink
Verify podman pull dup image only prints id once
Browse files Browse the repository at this point in the history
Fixes: containers#18647

Signed-off-by: Daniel J Walsh <[email protected]>
  • Loading branch information
rhatdan committed Jun 14, 2023
1 parent d464e1d commit c28a43e
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions test/system/010-images.bats
Original file line number Diff line number Diff line change
Expand Up @@ -330,4 +330,33 @@ Deleted: $pauseID"
run_podman rm my-container --force -t 0
}

@test "podman pull image with additional store" {
skip_if_remote "only works on local"

local imstore=$PODMAN_TMPDIR/imagestore
local sconf=$PODMAN_TMPDIR/storage.conf
cat >$sconf <<EOF
[storage]
driver="overlay"
[storage.options]
additionalimagestores = [ "$imstore/root" ]
EOF

skopeo copy containers-storage:$IMAGE \
containers-storage:\[overlay@$imstore/root+$imstore/runroot\]$IMAGE

CONTAINERS_STORAGE_CONF=$sconf run_podman images -a -n --format "{{.Repository}}:{{.Tag}} {{.ReadOnly}}"
is "${lines[0]}" "$IMAGE false" "image from readonly store"
is "${lines[1]}" "$IMAGE true" "image from readwrite store"

CONTAINERS_STORAGE_CONF=$sconf run_podman images -a -n --format "{{.Id}}"
id=${lines[0]}

CONTAINERS_STORAGE_CONF=$sconf run_podman pull -q $IMAGE
is "$output" "$id" "Should only print one line"

run_podman --root $imstore/root rmi --all
}

# vim: filetype=sh

0 comments on commit c28a43e

Please sign in to comment.