summaryrefslogtreecommitdiff
path: root/pkg/domain/infra
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-04-17 14:43:21 -0400
committerGitHub <noreply@github.com>2020-04-17 14:43:21 -0400
commitba289dcd79e3a2b5ec5dc02bd8adb84c93bef577 (patch)
tree977792d0b732bb67f9270d34e30bfac3cb5aab73 /pkg/domain/infra
parenta5884c07dfb092eab88cf153238e714910388a06 (diff)
parent44a8cf867665927111fe9ea03711c8fabfc7d4a2 (diff)
downloadpodman-ba289dcd79e3a2b5ec5dc02bd8adb84c93bef577.tar.gz
podman-ba289dcd79e3a2b5ec5dc02bd8adb84c93bef577.tar.bz2
podman-ba289dcd79e3a2b5ec5dc02bd8adb84c93bef577.zip
Merge pull request #5868 from baude/v2t2
Fixes for system tests
Diffstat (limited to 'pkg/domain/infra')
-rw-r--r--pkg/domain/infra/abi/containers.go10
-rw-r--r--pkg/domain/infra/abi/images_list.go2
2 files changed, 11 insertions, 1 deletions
diff --git a/pkg/domain/infra/abi/containers.go b/pkg/domain/infra/abi/containers.go
index c9df72f2d..50003dbe2 100644
--- a/pkg/domain/infra/abi/containers.go
+++ b/pkg/domain/infra/abi/containers.go
@@ -736,6 +736,16 @@ func (ic *ContainerEngine) ContainerRun(ctx context.Context, opts entities.Conta
} else {
report.ExitCode = int(ecode)
}
+ if opts.Rm {
+ if err := ic.Libpod.RemoveContainer(ctx, ctr, false, true); err != nil {
+ if errors.Cause(err) == define.ErrNoSuchCtr ||
+ errors.Cause(err) == define.ErrCtrRemoved {
+ logrus.Warnf("Container %s does not exist: %v", ctr.ID(), err)
+ } else {
+ logrus.Errorf("Error removing container %s: %v", ctr.ID(), err)
+ }
+ }
+ }
return &report, nil
}
diff --git a/pkg/domain/infra/abi/images_list.go b/pkg/domain/infra/abi/images_list.go
index 2f4020374..68b961cb6 100644
--- a/pkg/domain/infra/abi/images_list.go
+++ b/pkg/domain/infra/abi/images_list.go
@@ -54,7 +54,7 @@ func (ir *ImageEngine) List(ctx context.Context, opts entities.ImageListOptions)
ID: img.ID(),
ConfigDigest: string(img.ConfigDigest),
- Created: img.Created().Unix(),
+ Created: img.Created(),
Dangling: img.Dangling(),
Digest: string(img.Digest()),
Digests: digests,