From c8e73a0993af2c0938df32db3336e138a6d3b8ea Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Fri, 29 Sep 2023 14:53:51 -0400 Subject: [PATCH] test-oci-registry.sh: add a test for zstd layers --- tests/test-oci-registry.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/tests/test-oci-registry.sh b/tests/test-oci-registry.sh index 9503656b..0bee4784 100755 --- a/tests/test-oci-registry.sh +++ b/tests/test-oci-registry.sh @@ -23,7 +23,7 @@ set -euo pipefail skip_without_bwrap -echo "1..16" +echo "1..17" # Start the fake registry server @@ -197,6 +197,21 @@ assert_not_has_file $icondir/64x64 ok "appstream change" +# Build and install an app with zstd-compressed layers + +make_updated_app oci "" "" "ZSTD" + +${FLATPAK} build-bundle --oci --oci-layer-compress=zstd $FL_GPGARGS repos/oci oci/app-image-zstd org.test.Hello >&2 +file "$(pwd)/oci/app-image-zstd/blobs"/**/* | grep -q Zstandard +$client add hello latest "$(pwd)/oci/app-image-zstd" + +${FLATPAK} ${U} update -y -vv --ostree-verbose org.test.Hello >&2 + +run org.test.Hello &> hello_out +assert_file_has_content hello_out '^Hello world, from a sandboxZSTD$' + +ok "export and install zstd layers" + # Change the remote to a non-OCI remote, check that we cleaned up if [ x${USE_SYSTEMDIR-} == xyes ] ; then