summaryrefslogtreecommitdiff
path: root/client/image_push_test.go
diff options
context:
space:
mode:
authorSebastiaan van Stijn <github@gone.nl>2018-12-31 18:22:43 +0100
committerSebastiaan van Stijn <github@gone.nl>2019-03-16 00:40:55 +0100
commit161e0a90a633259606dbffd99141146acb680688 (patch)
treed89619a63afdfcfa62fefd8b3e4eb77565b0f0e6 /client/image_push_test.go
parent77c5668baf30dabbdee30284a4b285163b042cf3 (diff)
downloaddocker-161e0a90a633259606dbffd99141146acb680688.tar.gz
Update tests to check returned errors
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Diffstat (limited to 'client/image_push_test.go')
-rw-r--r--client/image_push_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/client/image_push_test.go b/client/image_push_test.go
index 0693601af1..48429ef5c9 100644
--- a/client/image_push_test.go
+++ b/client/image_push_test.go
@@ -10,6 +10,7 @@ import (
"testing"
"github.com/docker/docker/api/types"
+ "github.com/docker/docker/errdefs"
)
func TestImagePushReferenceError(t *testing.T) {
@@ -38,6 +39,9 @@ func TestImagePushAnyError(t *testing.T) {
if err == nil || err.Error() != "Error response from daemon: Server error" {
t.Fatalf("expected a Server Error, got %v", err)
}
+ if !errdefs.IsSystem(err) {
+ t.Fatalf("expected a Server Error, got %T", err)
+ }
}
func TestImagePushStatusUnauthorizedError(t *testing.T) {