Skip to content

Commit b46506c

Browse files
authored
Merge pull request #1572 from mtrmac/inspect-expect-config
Don't expect the config blob to be listed in (skopeo inspect)
2 parents 59a4522 + 49d9fa9 commit b46506c

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

systemtest/010-inspect.bats

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,19 @@ load helpers
2727
# Now run inspect locally
2828
run_skopeo inspect dir:$workdir
2929
inspect_local=$output
30-
31-
# Each SHA-named file must be listed in the output of 'inspect'
30+
run_skopeo inspect --raw dir:$workdir
31+
inspect_local_raw=$output
32+
config_digest=$(jq -r '.config.digest' <<<"$inspect_local_raw")
33+
34+
# Each SHA-named layer file (but not the config) must be listed in the output of 'inspect'.
35+
# As of Skopeo 1.6, (skopeo inspect)'s output lists layer digests,
36+
# but not the digest of the config blob ($config_digest), if any.
37+
layers=$(jq -r '.Layers' <<<"$inspect_local")
3238
for sha in $(find $workdir -type f | xargs -l1 basename | egrep '^[0-9a-f]{64}$'); do
33-
expect_output --from="$inspect_local" --substring "sha256:$sha" \
34-
"Locally-extracted SHA file is present in 'inspect'"
39+
if [ "sha256:$sha" != "$config_digest" ]; then
40+
expect_output --from="$layers" --substring "sha256:$sha" \
41+
"Locally-extracted SHA file is present in 'inspect'"
42+
fi
3543
done
3644

3745
# Simple sanity check on 'inspect' output.

0 commit comments

Comments
 (0)