mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Update tests to check returned errors
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/docker/docker/api/types/image"
|
||||
"github.com/docker/docker/errdefs"
|
||||
)
|
||||
|
||||
func TestImageHistoryError(t *testing.T) {
|
||||
@@ -21,6 +22,9 @@ func TestImageHistoryError(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 TestImageHistory(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user