From 68287ff8bd5200edbb6b486c7293ba6d76ae41bd Mon Sep 17 00:00:00 2001 From: Sujil02 Date: Thu, 30 Jan 2020 18:06:44 -0500 Subject: 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 --- pkg/bindings/errors.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'pkg/bindings/errors.go') 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) } -- cgit v1.2.3-54-g00ecf