mirror of
https://github.com/kemko/nomad.git
synced 2026-01-05 18:05:42 +03:00
pull alpine image needed for test
The test requires the image to be present locally, so importing it as part of setup.
This commit is contained in:
@@ -21,12 +21,20 @@ func TestDockerLogger(t *testing.T) {
|
||||
t.Skip("docker unavailable:", err)
|
||||
}
|
||||
|
||||
err = client.PullImage(docker.PullImageOptions{
|
||||
Repository: "alpine",
|
||||
Tag: "latest",
|
||||
}, docker.AuthConfiguration{})
|
||||
if err != nil {
|
||||
t.Fatalf("failed to pull image: %v", err)
|
||||
}
|
||||
|
||||
containerConf := docker.CreateContainerOptions{
|
||||
Config: &docker.Config{
|
||||
Cmd: []string{
|
||||
"/bin/ash", "-c", "touch /tmp/docklog; tail -f /tmp/docklog",
|
||||
},
|
||||
Image: "alpine",
|
||||
Image: "alpine:latest",
|
||||
},
|
||||
Context: context.Background(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user