mirror of
https://github.com/containers/skopeo.git
synced 2025-08-19 06:57:08 +00:00
Only look for the layer digests in the Layers field.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
parent
77363128e1
commit
49d9fa9faf
@ -34,9 +34,10 @@ load helpers
|
|||||||
# Each SHA-named layer file (but not the config) 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,
|
# As of Skopeo 1.6, (skopeo inspect)'s output lists layer digests,
|
||||||
# but not the digest of the config blob ($config_digest), if any.
|
# but not the digest of the config blob ($config_digest), if any.
|
||||||
|
layers=$(jq -r '.Layers' <<<"$inspect_local")
|
||||||
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
|
||||||
if [ "sha256:$sha" != "$config_digest" ]; then
|
if [ "sha256:$sha" != "$config_digest" ]; then
|
||||||
expect_output --from="$inspect_local" --substring "sha256:$sha" \
|
expect_output --from="$layers" --substring "sha256:$sha" \
|
||||||
"Locally-extracted SHA file is present in 'inspect'"
|
"Locally-extracted SHA file is present in 'inspect'"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user