summaryrefslogtreecommitdiff
path: root/test/e2e/libpod_suite_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 /test/e2e/libpod_suite_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 'test/e2e/libpod_suite_test.go')
-rw-r--r--test/e2e/libpod_suite_test.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/e2e/libpod_suite_test.go b/test/e2e/libpod_suite_test.go
index 170b24667..1d770accd 100644
--- a/test/e2e/libpod_suite_test.go
+++ b/test/e2e/libpod_suite_test.go
@@ -1,6 +1,7 @@
package integration
import (
+ "context"
"fmt"
"io/ioutil"
"os"
@@ -12,6 +13,7 @@ import (
"time"
"encoding/json"
+
"github.com/containers/image/copy"
"github.com/containers/image/signature"
"github.com/containers/image/storage"
@@ -327,9 +329,7 @@ func (p *PodmanTest) CreateArtifact(image string) error {
return errors.Errorf("error parsing image name %v: %v", exportTo, err)
}
- return copy.Image(policyContext, exportRef, importRef, options)
-
- return nil
+ return copy.Image(getTestContext(), policyContext, exportRef, importRef, options)
}
// RestoreArtifact puts the cached image into our test store
@@ -378,7 +378,7 @@ func (p *PodmanTest) RestoreArtifact(image string) error {
}()
options := &copy.Options{}
- err = copy.Image(policyContext, ref, importRef, options)
+ err = copy.Image(getTestContext(), policyContext, ref, importRef, options)
if err != nil {
return errors.Errorf("error importing %s: %v", importFrom, err)
}
@@ -622,3 +622,7 @@ func IsCommandAvailable(command string) bool {
}
return true
}
+
+func getTestContext() context.Context {
+ return context.Background()
+}