summaryrefslogtreecommitdiff
path: root/pkg/bindings/errors.go
diff options
context:
space:
mode:
authorSujil02 <sushah@redhat.com>2020-01-30 18:06:44 -0500
committerSujil02 <sushah@redhat.com>2020-02-03 15:33:28 -0500
commit68287ff8bd5200edbb6b486c7293ba6d76ae41bd (patch)
tree0b083bd32ef07e75d9f5a32b98a1d6ad0a9fb859 /pkg/bindings/errors.go
parent23f795786224c27f737e9043e9d513f54fa35ba8 (diff)
downloadpodman-68287ff8bd5200edbb6b486c7293ba6d76ae41bd.tar.gz
podman-68287ff8bd5200edbb6b486c7293ba6d76ae41bd.tar.bz2
podman-68287ff8bd5200edbb6b486c7293ba6d76ae41bd.zip
Add a binding test to check image tag and list commands.
Include testcase to validate tag api responses and check if all the image instaces are shown list command. Also, Update the binding process and the response Signed-off-by: Sujil02 <sushah@redhat.com>
Diffstat (limited to 'pkg/bindings/errors.go')
-rw-r--r--pkg/bindings/errors.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/pkg/bindings/errors.go b/pkg/bindings/errors.go
index 8bd40f804..1bcaac3f0 100644
--- a/pkg/bindings/errors.go
+++ b/pkg/bindings/errors.go
@@ -3,7 +3,6 @@ package bindings
import (
"encoding/json"
"io/ioutil"
- "net/http"
"github.com/containers/libpod/pkg/api/handlers/utils"
"github.com/pkg/errors"
@@ -26,7 +25,7 @@ func (a APIResponse) Process(unmarshalInto interface{}) error {
if err != nil {
return errors.Wrap(err, "unable to process API response")
}
- if a.Response.StatusCode == http.StatusOK {
+ if a.IsSuccess() {
if unmarshalInto != nil {
return json.Unmarshal(data, unmarshalInto)
}