Add pull support to client

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-05-24 14:06:50 -07:00
parent 3ba06e48ed
commit 923236004a
3 changed files with 151 additions and 0 deletions

View File

@@ -54,3 +54,18 @@ func TestNewContainer(t *testing.T) {
return
}
}
func TestImagePull(t *testing.T) {
client, err := New(defaultAddress)
if err != nil {
t.Fatal(err)
}
defer client.Close()
const ref = "docker.io/library/alpine:latest"
_, err = client.Pull(context.Background(), ref)
if err != nil {
t.Error(err)
return
}
}