File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -27,11 +27,19 @@ load helpers
27
27
# Now run inspect locally
28
28
run_skopeo inspect dir:$workdir
29
29
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" )
32
38
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
35
43
done
36
44
37
45
# Simple sanity check on 'inspect' output.
You can’t perform that action at this time.
0 commit comments