Skip to content

Commit 136d4e6

Browse files
committed
Add this for later.
1 parent 9d0f746 commit 136d4e6

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

pkg/mongotest/mongotest.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,19 @@ func (tc *TestConnection) StartMongoContainer(portNumber int) (containerID strin
175175
}
176176
pName := fmt.Sprintf("%d/tcp", portNumber)
177177
containerName := fmt.Sprintf("mongo-%d", portNumber)
178-
// TODO: Initial container pull can take some time - explicitly pull?
178+
179+
mongoImageName := "registry.hub.docker.com/library/mongo:latest"
180+
// TODO: Explicitly pull the initial container - ensure user feedback is in place
181+
// rc, err := tc.dockerClient.ImagePull(nil, mongoImageName, types.ImagePullOptions{})
182+
// defer rc.Close()
183+
// if err != nil {
184+
185+
// }
179186
containerResp, err := tc.dockerClient.ContainerCreate(
180187
context.Background(),
181188
&container.Config{
182189
// TODO: Allow setting mongo version
183-
Image: "registry.hub.docker.com/library/mongo:latest",
190+
Image: mongoImageName,
184191
Labels: map[string]string{
185192
"mongotest": "regression",
186193
},

0 commit comments

Comments
 (0)