summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2020-05-19 13:34:01 -0500
committerBrent Baude <bbaude@redhat.com>2020-05-20 12:56:38 -0500
commit2624c043d1b8aef69355616037ee2305298bd08a (patch)
tree0c4a979cc940618d38bf92b5d9c0d3db0a9d27a4 /cmd
parent4eee0d840f0af81560d89864ea64b95c9e70b18d (diff)
downloadpodman-2624c043d1b8aef69355616037ee2305298bd08a.tar.gz
podman-2624c043d1b8aef69355616037ee2305298bd08a.tar.bz2
podman-2624c043d1b8aef69355616037ee2305298bd08a.zip
Test fixes for remote integration
Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/containers/create.go4
-rw-r--r--cmd/podman/containers/rm.go2
2 files changed, 5 insertions, 1 deletions
diff --git a/cmd/podman/containers/create.go b/cmd/podman/containers/create.go
index 5058cdfe5..bb6cb5fdd 100644
--- a/cmd/podman/containers/create.go
+++ b/cmd/podman/containers/create.go
@@ -6,6 +6,8 @@ import (
"os"
"strings"
+ "github.com/containers/libpod/libpod/define"
+
"github.com/containers/common/pkg/config"
"github.com/containers/libpod/cmd/podman/common"
"github.com/containers/libpod/cmd/podman/registry"
@@ -203,7 +205,7 @@ func pullImage(imageName string) error {
}
if !br.Value || pullPolicy == config.PullImageAlways {
if pullPolicy == config.PullImageNever {
- return errors.New("unable to find a name and tag match for busybox in repotags: no such image")
+ return errors.Wrapf(define.ErrNoSuchImage, "unable to find a name and tag match for %s in repotags", imageName)
}
_, pullErr := registry.ImageEngine().Pull(registry.GetContext(), imageName, entities.ImagePullOptions{
Authfile: cliVals.Authfile,
diff --git a/cmd/podman/containers/rm.go b/cmd/podman/containers/rm.go
index 5ef2e23be..f01462447 100644
--- a/cmd/podman/containers/rm.go
+++ b/cmd/podman/containers/rm.go
@@ -128,5 +128,7 @@ func setExitCode(err error) {
registry.SetExitCode(1)
case cause == define.ErrCtrStateInvalid:
registry.SetExitCode(2)
+ case strings.Contains(cause.Error(), define.ErrCtrStateInvalid.Error()):
+ registry.SetExitCode(2)
}
}