summaryrefslogtreecommitdiff
path: root/libpod/image/image_test.go
diff options
context:
space:
mode:
authorumohnani8 <umohnani@redhat.com>2018-04-18 16:48:35 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-04-19 14:08:47 +0000
commit27107fdac1d75f97caab47cd13efb1d9900cf350 (patch)
treef5edafbb52505829b15e19ea6a9e66f4440e862b /libpod/image/image_test.go
parent6a9dbf3305e93e5e1c3bff09402a9b801c935fbd (diff)
downloadpodman-27107fdac1d75f97caab47cd13efb1d9900cf350.tar.gz
podman-27107fdac1d75f97caab47cd13efb1d9900cf350.tar.bz2
podman-27107fdac1d75f97caab47cd13efb1d9900cf350.zip
Vendor in latest containers/image and contaners/storage
Made necessary changes to functions to include contex.Context wherever needed Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #640 Approved by: baude
Diffstat (limited to 'libpod/image/image_test.go')
-rw-r--r--libpod/image/image_test.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/libpod/image/image_test.go b/libpod/image/image_test.go
index f160a14a4..71beed495 100644
--- a/libpod/image/image_test.go
+++ b/libpod/image/image_test.go
@@ -1,6 +1,7 @@
package image
import (
+ "context"
"fmt"
"io"
"io/ioutil"
@@ -81,9 +82,9 @@ func TestImage_NewFromLocal(t *testing.T) {
// Need images to be present for this test
ir, err := NewImageRuntimeFromOptions(so)
assert.NoError(t, err)
- bb, err := ir.New("docker.io/library/busybox:latest", "", "", writer, nil, SigningOptions{}, false, false)
+ bb, err := ir.New(context.Background(), "docker.io/library/busybox:latest", "", "", writer, nil, SigningOptions{}, false, false)
assert.NoError(t, err)
- bbglibc, err := ir.New("docker.io/library/busybox:glibc", "", "", writer, nil, SigningOptions{}, false, false)
+ bbglibc, err := ir.New(context.Background(), "docker.io/library/busybox:glibc", "", "", writer, nil, SigningOptions{}, false, false)
assert.NoError(t, err)
tm, err := makeLocalMatrix(bb, bbglibc)
@@ -126,7 +127,7 @@ func TestImage_New(t *testing.T) {
// Iterate over the names and delete the image
// after the pull
for _, img := range names {
- newImage, err := ir.New(img, "", "", writer, nil, SigningOptions{}, false, false)
+ newImage, err := ir.New(context.Background(), img, "", "", writer, nil, SigningOptions{}, false, false)
assert.NoError(t, err)
assert.NotEqual(t, newImage.ID(), "")
err = newImage.Remove(false)
@@ -150,7 +151,7 @@ func TestImage_MatchRepoTag(t *testing.T) {
}
ir, err := NewImageRuntimeFromOptions(so)
assert.NoError(t, err)
- newImage, err := ir.New("busybox", "", "", os.Stdout, nil, SigningOptions{}, false, false)
+ newImage, err := ir.New(context.Background(), "busybox", "", "", os.Stdout, nil, SigningOptions{}, false, false)
assert.NoError(t, err)
err = newImage.TagImage("foo:latest")
assert.NoError(t, err)