podman-remote pull: fix duplicate progress outputs

By vendoring the fixes from containers/image.  Also add a test (thanks
@edsantiago) to make sure we won't regress in the future again.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
Valentin Rothberg
2022-07-21 09:58:18 +02:00
parent 0de7e4662e
commit c1f04a024a
52 changed files with 6537 additions and 2253 deletions

View File

@ -61,8 +61,19 @@ function setup() {
}
@test "podman can pull an image" {
run_podman rmi -a
run_podman pull $IMAGE
# Regression test for https://github.com/containers/image/pull/1615
# Make sure no progress lines are duplicated
local -A line_seen
for line in "${lines[@]}"; do
if [[ -n "${line_seen[$line]}" ]]; then
die "duplicate podman-pull output line: $line"
fi
line_seen[$line]=1
done
# Also make sure that the tag@digest syntax is supported.
run_podman inspect --format "{{ .Digest }}" $IMAGE
digest=$output