summaryrefslogtreecommitdiff
path: root/libpod/runtime_img.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-02-02 11:02:09 -0600
committerAtomic Bot <atomic-devel@projectatomic.io>2018-02-02 22:44:40 +0000
commit6ba6ecf59b9204d36388de07b866f157a4d13957 (patch)
tree53bc85dd3e9820eb09014b1db2f8d136e86f6799 /libpod/runtime_img.go
parent3ea23f84818a816104ccdcf6b836ac4bb3a7c366 (diff)
downloadpodman-6ba6ecf59b9204d36388de07b866f157a4d13957.tar.gz
podman-6ba6ecf59b9204d36388de07b866f157a4d13957.tar.bz2
podman-6ba6ecf59b9204d36388de07b866f157a4d13957.zip
Migrate Create|Commit to ginkgo
Migrate create and commit bats tests to the ginkgo test suite. In doing so, some structures had to be moved to pkg/podmanstructs/podmanstructs.go so we could do better verification of test results. Signed-off-by: baude <bbaude@redhat.com> Closes: #286 Approved by: rhatdan
Diffstat (limited to 'libpod/runtime_img.go')
-rw-r--r--libpod/runtime_img.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/libpod/runtime_img.go b/libpod/runtime_img.go
index a572afcbb..76687351d 100644
--- a/libpod/runtime_img.go
+++ b/libpod/runtime_img.go
@@ -28,6 +28,7 @@ import (
"github.com/pkg/errors"
"github.com/projectatomic/libpod/libpod/common"
"github.com/projectatomic/libpod/libpod/driver"
+ "github.com/projectatomic/libpod/pkg/inspect"
)
// Runtime API
@@ -492,7 +493,7 @@ func getRegistries() ([]string, error) {
// ImageFilter is a function to determine whether an image is included in
// command output. Images to be outputted are tested using the function. A true
// return will include the image, a false return will exclude it.
-type ImageFilter func(*storage.Image, *ImageData) bool
+type ImageFilter func(*storage.Image, *inspect.ImageData) bool
func (ips imageDecomposeStruct) returnFQName() string {
return fmt.Sprintf("%s%s/%s:%s", ips.transport, ips.registry, ips.imageName, ips.tag)
@@ -1072,7 +1073,7 @@ func (r *Runtime) ImportImage(path string, options CopyOptions) error {
}
// GetImageInspectInfo returns the inspect information of an image
-func (r *Runtime) GetImageInspectInfo(image storage.Image) (*ImageData, error) {
+func (r *Runtime) GetImageInspectInfo(image storage.Image) (*inspect.ImageData, error) {
r.lock.RLock()
defer r.lock.RUnlock()
@@ -1082,7 +1083,7 @@ func (r *Runtime) GetImageInspectInfo(image storage.Image) (*ImageData, error) {
return r.getImageInspectInfo(image)
}
-func (r *Runtime) getImageInspectInfo(image storage.Image) (*ImageData, error) {
+func (r *Runtime) getImageInspectInfo(image storage.Image) (*inspect.ImageData, error) {
imgRef, err := r.getImageRef("@" + image.ID)
if err != nil {
return nil, errors.Wrapf(err, "error reading image %q", image.ID)