From 6d57cd43b964e928111542771659af6a3a58521f Mon Sep 17 00:00:00 2001 From: Paul Tyng Date: Wed, 5 Jul 2017 15:40:17 -0400 Subject: [PATCH] Expose ability to set docker auth for private repos Signed-off-by: Paul Tyng --- dockertest.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dockertest.go b/dockertest.go index eb891f7a..98ed6fa5 100644 --- a/dockertest.go +++ b/dockertest.go @@ -100,6 +100,7 @@ type RunOptions struct { Mounts []string Links []string ExposedPorts []string + Auth dc.AuthConfiguration } // RunWithOptions starts a docker container. @@ -144,7 +145,7 @@ func (d *Pool) RunWithOptions(opts *RunOptions) (*Resource, error) { if err := d.Client.PullImage(dc.PullImageOptions{ Repository: repository, Tag: tag, - }, dc.AuthConfiguration{}); err != nil { + }, opts.Auth); err != nil { return nil, errors.Wrap(err, "") } }