mirror of
https://github.com/containers/skopeo.git
synced 2025-08-19 06:57:08 +00:00
Don't expect the config blob to be listed in (skopeo inspect)
... because it currently isn't. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
parent
59a452276b
commit
77363128e1
@ -27,11 +27,18 @@ load helpers
|
|||||||
# Now run inspect locally
|
# Now run inspect locally
|
||||||
run_skopeo inspect dir:$workdir
|
run_skopeo inspect dir:$workdir
|
||||||
inspect_local=$output
|
inspect_local=$output
|
||||||
|
run_skopeo inspect --raw dir:$workdir
|
||||||
|
inspect_local_raw=$output
|
||||||
|
config_digest=$(jq -r '.config.digest' <<<"$inspect_local_raw")
|
||||||
|
|
||||||
# Each SHA-named file must be listed in the output of 'inspect'
|
# Each SHA-named layer file (but not the config) must be listed in the output of 'inspect'.
|
||||||
|
# As of Skopeo 1.6, (skopeo inspect)'s output lists layer digests,
|
||||||
|
# but not the digest of the config blob ($config_digest), if any.
|
||||||
for sha in $(find $workdir -type f | xargs -l1 basename | egrep '^[0-9a-f]{64}$'); do
|
for sha in $(find $workdir -type f | xargs -l1 basename | egrep '^[0-9a-f]{64}$'); do
|
||||||
expect_output --from="$inspect_local" --substring "sha256:$sha" \
|
if [ "sha256:$sha" != "$config_digest" ]; then
|
||||||
"Locally-extracted SHA file is present in 'inspect'"
|
expect_output --from="$inspect_local" --substring "sha256:$sha" \
|
||||||
|
"Locally-extracted SHA file is present in 'inspect'"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Simple sanity check on 'inspect' output.
|
# Simple sanity check on 'inspect' output.
|
||||||
|
Loading…
Reference in New Issue
Block a user