Skip to content

Commit

Permalink
Merge pull request containers#24686 from mtrmac/test-typo
Browse files Browse the repository at this point in the history
Fix apparent typos in zstd:chunked tests
  • Loading branch information
openshift-merge-bot[bot] authored Nov 28, 2024
2 parents 3d720ce + 6f85808 commit 18191d6
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions test/system/155-partial-pull.bats
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ load helpers.registry
# BEGIN filtering - none of these tests will work with podman-remote

function setup() {
skip_if_remote "none of these tests work with podman-remote"
skip_if_remote "zstd:chunked tests depend on start_registry (requires changing storage options); and on setting specific storage options. Neither works with podman-remote"

basic_setup
start_registry
Expand All @@ -25,7 +25,7 @@ function setup() {
@test "push and pull zstd chunked image" {
image1=localhost:${PODMAN_LOGIN_REGISTRY_PORT}/img1-$(safename)

globalargs="--pull-option enable_partial_pulls=true"
globalargs="--pull-option enable_partial_images=true"
pushpullargs="--cert-dir ${PODMAN_LOGIN_WORKDIR}/trusted-registry-cert-dir \
--creds ${PODMAN_LOGIN_USER}:${PODMAN_LOGIN_PASS}"

Expand Down Expand Up @@ -84,9 +84,12 @@ EOF

run_podman $globalargs rmi $image2 $image3

run_podman $globalargs pull \
run_podman --log-level debug $globalargs pull \
$pushpullargs \
$image2
if [ "$(podman_storage_driver)" != vfs ]; then # VFS does not implement partial pulls
assert "$output" =~ "Retrieved partial blob" # A spot check that we are really using the partial-pull code path
fi

run -0 skopeo inspect containers-storage:$image2
assert "$output" =~ "application/vnd.oci.image.layer.v1.tar\+zstd" "pulled image must be zstd-compressed"
Expand Down Expand Up @@ -157,11 +160,12 @@ function mount_image_and_take_digest() {
}

@test "zstd chunked does not modify image content" {
skip_if_remote "need to mount an image" # remote tests are already skipped in setup, this is one more reason.
skip_if_rootless "need to mount the image without unshare"

image=localhost:${PODMAN_LOGIN_REGISTRY_PORT}/img-$(safename)

globalargs="--storage-driver $(podman_storage_driver) --pull-option enable_partial_pulls=true"
globalargs="--storage-driver $(podman_storage_driver) --pull-option enable_partial_images=true"
pushpullargs="--cert-dir ${PODMAN_LOGIN_WORKDIR}/trusted-registry-cert-dir \
--creds ${PODMAN_LOGIN_USER}:${PODMAN_LOGIN_PASS}"

Expand All @@ -182,9 +186,12 @@ EOF

run_podman $globalargs rmi $image

run_podman $globalargs pull \
run_podman --log-level debug $globalargs pull \
$pushpullargs \
$image
if [ "$(podman_storage_driver)" != vfs ]; then # VFS does not implement partial pulls
assert "$output" =~ "Retrieved partial blob" # A spot check that we are really using the partial-pull code path
fi

# expect that the image contains exactly the same data as before
mount_image_and_take_digest $image
Expand Down

0 comments on commit 18191d6

Please sign in to comment.