File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
cmd/container-structure-test/app/cmd Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,6 @@ def _structure_test_impl(ctx):
54
54
if ctx .attr .driver != "docker" :
55
55
fail ("when the 'driver' attribute is not 'docker', then the image must be a .tar file" )
56
56
fixed_args .extend (["--image-from-oci-layout" , "$(rlocation %s)" % image_path ])
57
- fixed_args .extend (["--default-image-tag" , "registry.structure_test.oci.local/image:$DIGEST" ])
58
57
59
58
for arg in ctx .files .configs :
60
59
fixed_args .extend (["--config" , "$(rlocation %s)" % to_rlocation_path (ctx , arg )])
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import (
19
19
"io"
20
20
"os"
21
21
"runtime"
22
+
22
23
"github.com/GoogleContainerTools/container-structure-test/cmd/container-structure-test/app/cmd/test"
23
24
v1 "github.com/opencontainers/image-spec/specs-go/v1"
24
25
@@ -150,9 +151,18 @@ func run(out io.Writer) error {
150
151
logrus .Fatalf ("could parse the default image tag %s: %v" , opts .DefaultImageTag , err )
151
152
}
152
153
}
153
- if _ , err = daemon .Write (tag , img ); err != nil {
154
+ var r string
155
+ if r , err = daemon .Write (tag , img ); err != nil {
154
156
logrus .Fatalf ("error loading oci layout into daemon: %v, %s" , err )
155
157
}
158
+ // For some reason, daemon.Write doesn't return errors for some edge cases.
159
+ // We should always print what the daemon sent back so that errors are transparent.
160
+ fmt .Println ("Loaded " , tag .String (), r )
161
+
162
+ _ , err = daemon .Image (tag )
163
+ if err != nil {
164
+ logrus .Fatalf ("error loading oci layout into daemon: %v" , err )
165
+ }
156
166
157
167
opts .ImagePath = tag .String ()
158
168
args .Image = tag .String ()
You can’t perform that action at this time.
0 commit comments