summaryrefslogtreecommitdiffhomepage
path: root/pkg/test/dockerutil/container.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/test/dockerutil/container.go')
-rw-r--r--pkg/test/dockerutil/container.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/pkg/test/dockerutil/container.go b/pkg/test/dockerutil/container.go
index 41fcf4978..06152a444 100644
--- a/pkg/test/dockerutil/container.go
+++ b/pkg/test/dockerutil/container.go
@@ -434,7 +434,14 @@ func (c *Container) Wait(ctx context.Context) error {
select {
case err := <-errChan:
return err
- case <-statusChan:
+ case res := <-statusChan:
+ if res.StatusCode != 0 {
+ var msg string
+ if res.Error != nil {
+ msg = res.Error.Message
+ }
+ return fmt.Errorf("container returned non-zero status: %d, msg: %q", res.StatusCode, msg)
+ }
return nil
}
}