diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-04-15 15:13:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-15 15:13:18 +0200 |
commit | a756161e80cd32b705bb0dfe3ec4753f883ec929 (patch) | |
tree | 9cb56a2ea3c77201de133eddad8d3bbf04b4a166 /pkg/domain | |
parent | ffcb99d8320f7b53548af7210b9705a3590a1bb8 (diff) | |
parent | 60dde457f6dc5ec5062a946dbd0848a2b0b06a22 (diff) | |
download | podman-a756161e80cd32b705bb0dfe3ec4753f883ec929.tar.gz podman-a756161e80cd32b705bb0dfe3ec4753f883ec929.tar.bz2 podman-a756161e80cd32b705bb0dfe3ec4753f883ec929.zip |
Merge pull request #5813 from baude/v2edtests2
More system test fixes on regressions
Diffstat (limited to 'pkg/domain')
-rw-r--r-- | pkg/domain/entities/images.go | 13 | ||||
-rw-r--r-- | pkg/domain/infra/abi/images.go | 6 |
2 files changed, 11 insertions, 8 deletions
diff --git a/pkg/domain/entities/images.go b/pkg/domain/entities/images.go index 53a5f4951..78ebb8805 100644 --- a/pkg/domain/entities/images.go +++ b/pkg/domain/entities/images.go @@ -2,6 +2,7 @@ package entities import ( "net/url" + "time" "github.com/containers/image/v5/manifest" "github.com/containers/image/v5/types" @@ -99,12 +100,12 @@ type ImageDeleteReport struct { type ImageHistoryOptions struct{} type ImageHistoryLayer struct { - ID string `json:"Id"` - Created int64 `json:",omitempty"` - CreatedBy string `json:",omitempty"` - Tags []string `json:",omitempty"` - Size int64 `json:",omitempty"` - Comment string `json:",omitempty"` + ID string `json:"id"` + Created time.Time `json:"created,omitempty"` + CreatedBy string `json:",omitempty"` + Tags []string `json:"tags,omitempty"` + Size int64 `json:"size"` + Comment string `json:"comment,omitempty"` } type ImageHistoryReport struct { diff --git a/pkg/domain/infra/abi/images.go b/pkg/domain/infra/abi/images.go index a69a136a6..9467c14d4 100644 --- a/pkg/domain/infra/abi/images.go +++ b/pkg/domain/infra/abi/images.go @@ -46,7 +46,9 @@ func (ir *ImageEngine) Delete(ctx context.Context, nameOrId []string, opts entit if err != nil { return &report, errors.Wrapf(err, "unable to query local images") } - + if len(targets) == 0 { + return &report, nil + } if len(targets) > 0 && len(targets) == len(previousTargets) { return &report, errors.New("unable to delete all images; re-run the rmi command again.") } @@ -143,7 +145,7 @@ func (ir *ImageEngine) History(ctx context.Context, nameOrId string, opts entiti func ToDomainHistoryLayer(layer *libpodImage.History) entities.ImageHistoryLayer { l := entities.ImageHistoryLayer{} l.ID = layer.ID - l.Created = layer.Created.Unix() + l.Created = *layer.Created l.CreatedBy = layer.CreatedBy copy(l.Tags, layer.Tags) l.Size = layer.Size |