summaryrefslogtreecommitdiff
path: root/cmd/podman/images.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 /cmd/podman/images.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 'cmd/podman/images.go')
-rw-r--r--cmd/podman/images.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/cmd/podman/images.go b/cmd/podman/images.go
index 1f1174950..540a5f4f3 100644
--- a/cmd/podman/images.go
+++ b/cmd/podman/images.go
@@ -13,6 +13,7 @@ import (
"github.com/projectatomic/libpod/cmd/podman/formats"
"github.com/projectatomic/libpod/libpod"
"github.com/projectatomic/libpod/libpod/common"
+ "github.com/projectatomic/libpod/pkg/inspect"
"github.com/urfave/cli"
)
@@ -273,7 +274,7 @@ func generateImagesOutput(runtime *libpod.Runtime, images []*storage.Image, opts
func generateImagesFilter(params *libpod.ImageFilterParams, filterType string) libpod.ImageFilter {
switch filterType {
case "label":
- return func(image *storage.Image, info *libpod.ImageData) bool {
+ return func(image *storage.Image, info *inspect.ImageData) bool {
if params == nil || params.Label == "" {
return true
}
@@ -290,21 +291,21 @@ func generateImagesFilter(params *libpod.ImageFilterParams, filterType string) l
return false
}
case "before-image":
- return func(image *storage.Image, info *libpod.ImageData) bool {
+ return func(image *storage.Image, info *inspect.ImageData) bool {
if params == nil || params.BeforeImage.IsZero() {
return true
}
return info.Created.Before(params.BeforeImage)
}
case "since-image":
- return func(image *storage.Image, info *libpod.ImageData) bool {
+ return func(image *storage.Image, info *inspect.ImageData) bool {
if params == nil || params.SinceImage.IsZero() {
return true
}
return info.Created.After(params.SinceImage)
}
case "dangling":
- return func(image *storage.Image, info *libpod.ImageData) bool {
+ return func(image *storage.Image, info *inspect.ImageData) bool {
if params == nil || params.Dangling == "" {
return true
}
@@ -317,14 +318,14 @@ func generateImagesFilter(params *libpod.ImageFilterParams, filterType string) l
return false
}
case "reference":
- return func(image *storage.Image, info *libpod.ImageData) bool {
+ return func(image *storage.Image, info *inspect.ImageData) bool {
if params == nil || params.ReferencePattern == "" {
return true
}
return libpod.MatchesReference(params.ImageName, params.ReferencePattern)
}
case "image-input":
- return func(image *storage.Image, info *libpod.ImageData) bool {
+ return func(image *storage.Image, info *inspect.ImageData) bool {
if params == nil || params.ImageInput == "" {
return true
}